About
A bottom sheet on phones that becomes a centered dialog on desktop, with drag-to-dismiss, a grabber, and configurable footer/side/size for modal content like confirmations or filters.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Adaptive Sheet to your project and fits it to your theme.
Code
How Adaptive Sheet is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import Sheet from "@/components/ui/sheet";
import { useState } from "react";
export default function SheetDemo() {
const [open, setOpen] = useState(false);
return (
<div
className="flex min-h-[480px] w-full items-center justify-center p-10"
style={{
background: "var(--may-color-bg, #f2f2f7)",
color: "var(--may-color-text, #000)",
}}
>
<button
type="button"
onClick={() => setOpen(true)}
className="inline-flex h-11 items-center justify-center rounded-lg bg-blue-500 px-5 text-sm font-semibold text-white"
>
Open sheet
</button>
<Sheet
open={open}
onClose={() => setOpen(false)}
title="Share"
description="Choose a device nearby to share with."
footer={
<>
<button
type="button"
onClick={() => setOpen(false)}
className="h-9 rounded-md px-4 text-sm font-medium text-blue-500"
>
Cancel
</button>
<button
type="button"
onClick={() => setOpen(false)}
className="h-9 rounded-md bg-blue-500 px-4 text-sm font-semibold text-white"
>
Share
</button>
</>
}
>
<ul className="divide-y divide-black/5 text-sm">
<li className="flex items-center justify-between py-3">
<span>Alex's Laptop</span>
<span className="text-neutral-400">Nearby</span>
</li>
<li className="flex items-center justify-between py-3">
<span>Jordan's Phone</span>
<span className="text-neutral-400">Nearby</span>
</li>
<li className="flex items-center justify-between py-3">
<span>Office Display</span>
</li>
</ul>
</Sheet>
</div>
);
}








