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

<app-sheet> ├── [appSheetTrigger] └── <app-sheet-content> ├── generated portal, overlay, and positioner ├── [appSheetHeader] │ ├── [appSheetTitle] │ └── [appSheetDescription] ├── content ├── [appSheetFooter] (optional) ├── [appSheetClose] (optional) └── generated close button (optional)

Examples

Bottom

Loading...

Comments

Loading...

Default

Loading...

Event

Loading...

Order

Loading...

Payment

Loading...

Shortcuts

Loading...

API Reference

<app-sheet>

Inputs

InputTypeDefaultDescription
idstring | undefinedgeneratedUnique identifier used to create the sheet part IDs.
idsPartial<DialogElementIds> | undefined—Overrides the generated IDs for individual dialog parts.
aria-labelstring | undefined—Accessible name used when no visible title is rendered.
openboolean | undefined—Open state when controlled. Supports Angular two-way binding.
defaultOpenbooleanfalseInitial open state when uncontrolled.
modalbooleantrueMakes content outside the sheet inert while it is open.
closeOnInteractOutsidebooleantrueCloses the sheet after an interaction outside its content.
closeOnEscapebooleantrueCloses the sheet when Escape is pressed.
preventScrollbooleanmodalPrevents document scrolling while the sheet is open.
trapFocusbooleanmodalKeeps keyboard focus inside the sheet while it is open.
restoreFocusbooleantrueRestores focus when the sheet closes.
initialFocusEl(() => HTMLElement | null | false) | undefined—Returns the element to focus when the sheet opens.
finalFocusEl(() => HTMLElement | null) | undefined—Returns the element to focus when the sheet closes.
persistentElementsArray<() => Element | null> | undefined—Elements that remain interactive outside a modal sheet.
triggerValuestring | null | undefined—Active trigger value when controlled. Supports two-way binding.
defaultTriggerValuestring | null | undefined—Initial active trigger value when uncontrolled.

Outputs

OutputTypeDescription
openChangeboolean | undefinedEmits the current open state.
triggerValueChangestring | null | undefinedEmits the current active trigger value.
escapeKeyDownKeyboardEventEmits when Escape is pressed while the sheet is open.
focusOutsideDialogFocusOutsideEventEmits when focus moves outside the sheet content.
interactOutsideDialogInteractOutsideEventEmits when an interaction occurs outside the content.
pointerDownOutsideDialogPointerDownOutsideEventEmits when a pointer is pressed outside the content.
requestDismissCustomEventEmits when a layered interaction requests dismissal.
openChangeDetailsDialogOpenChangeDetailsEmits details whenever the open state changes.
triggerValueChangeDetailsDialogTriggerValueChangeDetailsEmits details whenever the active trigger changes.

[appSheetTrigger]

Inputs

InputTypeDefaultDescription
valuestring | undefined—Identifies this trigger when multiple triggers exist.

<app-sheet-content>

Inputs

InputTypeDefaultDescription
side"top" | "right" | "bottom" | "left""right"Edge from which the sheet enters.
showCloseButtonbooleantrueRenders the generated close button.
classstring""Additional classes applied to the content panel.

Context, Providers, and Utilities

ExportAngular API
DialogContextStructural directive [dialog-context] included by SheetImports.
DialogRootProviderDirective for providing an externally created dialog API, included by imports.
SheetImportsReadonly collection containing all sheet UI directives and context helpers.