Search documentation

Search the documentation and open a page.

Extends the Dialog component to display content that complements the main content of the screen.

Loading...

Installation

pnpm dlx shadcn@latest add @wirekyt/sheet

Composition

Sheet ├── SheetTrigger └── SheetContent ├── SheetHeader │ ├── SheetTitle │ └── SheetDescription ├── content ├── SheetFooter (optional) └── SheetClose

Examples

Bottom

Loading...

Comments

Loading...

Default

Loading...

Event

Loading...

Order

Loading...

Payment

Loading...

Shortcuts

Loading...

API Reference

Sheet

PropTypeDefaultDescription
idstring | undefined—Unique identifier used to connect the component parts.
idsElementIds | undefined—Overrides generated identifiers for individual parts.
trapFocusboolean | undefined—Configures trap focus.
preventScrollboolean | undefined—Configures prevent scroll.
modalboolean | undefined—Configures modal.
initialFocusEl(() => MaybeElement) | undefined—Configures initial focus el.
finalFocusEl(() => MaybeElement) | undefined—Configures final focus el.
restoreFocusboolean | undefined—Configures restore focus.
closeOnInteractOutsideboolean | undefinedtrueConfigures close on interact outside.
closeOnEscapeboolean | undefinedtrueConfigures close on escape.
role"dialog" | "alertdialog" | undefined—Configures role.
openboolean | undefined—Whether the component is open when controlled.
defaultOpenboolean | undefined—Initial open state when uncontrolled.
onOpenChange((details: OpenChangeDetails) => void) | undefined—Runs when open changes.
triggerValuestring | null | undefined—Configures trigger value.
defaultTriggerValuestring | null | undefined—Configures default trigger value.
onTriggerValueChange((details: TriggerValueChangeDetails) => void) | undefined—Runs when trigger value changes.

Context, Hooks, and Types

ExportAPI
SheetContextRender-prop component that exposes component state and actions.
SheetRootProviderProvides an externally created API to the component tree.
useSheetCreates or accesses the component API.
useSheetContextReturns the nearest component API.
SheetOpenChangeDetailsType for the details object passed to the matching change callback.