Dialog
A focused surface for decisions that need attention.
A sheet that rests at a peek or full height and follows your finger.
npx shadcn@latest add @silicon-ui/bottom-sheetnpx shadcn@latest add @silicon-ui/bottom-sheetInstall the dependencies.
npm install @radix-ui/react-dialog lucide-react motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/bottom-sheet/bottom-sheet.tsxcomponents/silicon-ui/bottom-sheet/bottom-sheet.module.csscomponents/silicon-ui/lib/escape.ts sharedcomponents/silicon-ui/lib/return-focus.ts sharedInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
BottomSheet| Prop | Type | Default |
|---|---|---|
title* | string | — |
children* | ReactNode | — |
triggerThe control that opens the sheet, usually a button. Focus returns to it when the sheet closes. | ReactNode | — |
open | boolean | — |
defaultOpen | boolean | false |
onOpenChange | (open: boolean) => void | — |
description | string | — |
detentsResting heights as fractions of the viewport height. The sheet opens at `initialDetent` and never grows past the largest. | number[] | — |
initialDetentIndex into the sorted detents the sheet opens at. Defaults to the smallest. | number | — |
onDetentChange | (index: number) => void | — |
closeLabel | string | — |
className | string | — |
BottomSheetCloseAccepts the props of ButtonHTMLAttributes.