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 SheetDrawerDemo() {
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-neutral-800 px-5 text-sm font-semibold text-white"
>
Open filters
</button>
<Sheet
open={open}
onClose={() => setOpen(false)}
side="end"
size="sm"
title="Filters"
description="Narrow down the results."
footer={
<button
type="button"
onClick={() => setOpen(false)}
className="h-9 w-full rounded-md bg-blue-500 px-4 text-sm font-semibold text-white"
>
Apply
</button>
}
footerLayout="stack"
>
<div className="space-y-4 text-sm">
<div>
<p className="mb-1 font-medium">Size</p>
<p className="text-neutral-500">Small, Medium, Large</p>
</div>
<div>
<p className="mb-1 font-medium">Color</p>
<p className="text-neutral-500">Black, White, Blue</p>
</div>
<div>
<p className="mb-1 font-medium">Price</p>
<p className="text-neutral-500">Under 50, 50 to 100, 100 plus</p>
</div>
</div>
</Sheet>
</div>
);
}








