Components
Components
Dialog
Modal surface for confirmations and focused tasks.
newfree
Install
@hewnui/ui · @hewnui/themes · hewnui
First install? Follow Getting started for peers, CSS and providers.
Dialog pairs a trigger with a dismissible modal. Content uses compound parts for title, body, and actions.
Usage
Use a non-destructive task for the default dismissible role="dialog". For
delete/archive confirms, prefer an alertdialog pattern that is not dismissed by
an outside click (Hewn lint rule destructive-confirms).
Accessibility
- Dialog role and labeled title
- Escape and outside click dismiss (default
isDismissable) - Tab and Shift+Tab stay inside the dialog while it is open
- Focus moves into the modal while open and returns to the trigger on close
API reference
Props for Dialog from @hewnui/ui/dialog. Generated from component types — not hand-written.
Prop
Type
DialogTrigger
Props for DialogTrigger.
Prop
Type
DialogBody
Props for DialogBody.
Prop
Type
DialogActions
Props for DialogActions.
Prop
Type