Components

Dialog ​

Dialogs interrupt the current flow to confirm an action, gather focused input, or present short-form detail without leaving the page.

Basic Usage ​

Use a trigger, content container, header, and footer to create a straightforward modal action flow.

Confirmation ​

Use confirmation dialogs for destructive or high-impact actions. Set disable-pointer-dismissal so a backdrop click cannot dismiss by accident.

Scrollable Content ​

Constrain long content inside the dialog body so actions remain reachable.

Initial Focus ​

Put autofocus on the control that should receive focus when the dialog opens (often the first field).

API ​

Slots ​

NameDescription
triggerOpens the dialog (optional — use open for declarative control)
headerCustom header region (replaces the built-in label header)
labelDialog title
footerDialog footer actions
(default)Dialog body

Props ​

NameDescription
descriptionOptional subtitle under the title in the built-in header (v1 DialogDescription).
Type string
disablePointerDismissalMaps to light-dismiss (inverted).
Type boolean
Default false
disableScrollLockSkip document scroll lock while open. Useful for labs / rare cases where the page should keep scrolling under the modal (native dialog still traps focus).
Type boolean
Default false
labelType string
openType boolean
Default false
sizeType 'default' | 'wide'
Default default
withoutBodyPaddingOpt out of the default 1rem body padding applied when the built-in header is shown. Use for flush layouts (sidebars, full-bleed pickers) that own their own inset.
Type boolean
Default false
withoutHeaderType boolean
Default false

Methods ​

NameDescription
hide(source: PkOverlaySource)—
show(_source: PkOverlaySource)Shows the dialog — show().

Events ​

NameDescription
onPkOpenChange—

CSS Parts ​

NameDescriptionCSS selector
bodyBody region::part(body)
footerFooter region::part(footer)
headerHeader region::part(header)
panelNative dialog element::part(panel)
Edit this page
Last updated: Sep 9, 2026, 7:18 PM