Sheet
Dialog panel sliding in from any edge.
Installation
Usage
Examples
Left side
Slide in from any edge with the side prop.
API reference
Sheet
| Prop | Type | Default |
|---|---|---|
openControlled open state. Use with onOpenChange. | boolean | - |
defaultOpenInitially open when uncontrolled. | boolean | false |
onOpenChangeCalled when the sheet opens or closes. | (open: boolean) => void | - |
onOpenChangeCompleteCalled after open or close animations finish. | (open: boolean) => void | - |
modalLimit interaction to the sheet while open. | boolean | 'trap-focus' | true |
disablePointerDismissalKeep the sheet open on outside clicks. | boolean | false |
SheetContent
| Prop | Type | Default |
|---|---|---|
sideEdge the panel slides in from. | "top" | "right" | "bottom" | "left" | "right" |
showCloseButtonShow the corner X close button. | boolean | true |
renderPolymorphic render prop. Use to render a custom element instead of the default panel. | ReactElement | ((props) => ReactNode) | - |
classNameAdditional classes merged with the default panel styles. | string | - |
SheetTrigger
| Prop | Type | Default |
|---|---|---|
renderRender a custom trigger element, e.g. render={<Button>Open sheet</Button>}. | ReactElement | ((props) => ReactNode) | - |
disabledDisable the trigger. | boolean | false |
SheetClose
| Prop | Type | Default |
|---|---|---|
renderRender a custom close control. Must live inside the sheet. | ReactElement | ((props) => ReactNode) | - |
SheetHeader
| Prop | Type | Default |
|---|---|---|
classNameAdditional classes. Pairs with SheetTitle and SheetDescription. | string | - |
SheetTitle
| Prop | Type | Default |
|---|---|---|
classNameAdditional classes merged with the title styles. | string | - |
SheetDescription
| Prop | Type | Default |
|---|---|---|
classNameAdditional classes merged with the muted description styles. | string | - |