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 SheetNotDismissibleDemo() {
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-red-500 px-5 text-sm font-semibold text-white"
>
Delete account
</button>
<Sheet
open={open}
onClose={() => setOpen(false)}
dismissible={false}
closeOnScrimClick={false}
size="sm"
title="Delete account?"
description="This removes everything and cannot be undone."
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-red-500 px-4 text-sm font-semibold text-white"
>
Delete
</button>
</>
}
/>
</div>
);
}








