Founding price: $35, then $79.99 after 23:59 UTC on 4 November, then $79.99
Get ProA modal sheet that rises from the bottom edge, rests at snap points you choose, drags and flings between them, and closes with Escape, the overlay or a downward drag.
This item has no props to tune. Use the lens above to change theme, density, direction and more.
Use it on phones for a task that needs the screen for a moment but should keep the page visible behind it: filters, a share panel, a detail card, a map list with a half and a full height.
Do not use it for a blocking confirmation (use an alert dialog) or for navigation that should be a page. For a panel that never goes away, use Persistent Sheet. To get a dialog on desktop and a sheet on phones, use Responsive Dialog.
import {
BottomSheet,
BottomSheetContent,
BottomSheetDescription,
BottomSheetHeader,
BottomSheetTitle,
BottomSheetTrigger,
} from "@/components/ui/bottom-sheet"<BottomSheet snapPoints={[0.4, 0.7, 1]}>
<BottomSheetTrigger asChild>
<Button>Open</Button>
</BottomSheetTrigger>
<BottomSheetContent>
<BottomSheetHeader>
<BottomSheetTitle>Nearby</BottomSheetTitle>
<BottomSheetDescription>Drag to resize.</BottomSheetDescription>
</BottomSheetHeader>
...
</BottomSheetContent>
</BottomSheet>| Part | Prop | Type | Default | Description |
|---|---|---|---|---|
BottomSheet | snapPoints | number[] | undefined | Heights as fractions of the screen, ascending. Leave out for a sheet as tall as its content. |
BottomSheet | snap / defaultSnap | number | 0 | Controlled and starting snap index. |
BottomSheet | onSnapChange | (index: number) => void | - | Called when a drag, key or code changes the snap point. |
BottomSheet | dismissible | boolean | true | Allow drag down, Escape and the overlay to close. |
BottomSheet | open / defaultOpen / onOpenChange | - | - | As on the Radix dialog. |
BottomSheetContent | handleLabel | string | "Resize sheet" | Accessible name of the handle. |
BottomSheetContent | hideHandle | boolean | false | Remove the handle. |
- | useSnapDrag, SnapHandle, snapLabel | - | - | Building blocks reused by Persistent Sheet. |
dismissible is false).The component ships with a Testing Library test (bottom-sheet.test.tsx). jsdom has no layout or touch, so the test checks the dialog semantics, the handle's keyboard control of the snap index and Escape, and that a non-dismissible sheet ignores Escape.