Dialog
Modal dialog for focused interactions with backdrop overlay.
Import
Basic Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| open | boolean | - | Whether the dialog is open (controlled) |
| defaultOpen | boolean | - | Default open state (uncontrolled) |
| onOpenChange | (open: boolean) => void | - | Callback when open state changes |
| title | React.ReactNode | - | Dialog title |
| children | React.ReactNode | - | Dialog content |
| trigger | React.ReactElement | - | Trigger element |
| className | string | - | Additional CSS class names |
Variants
With Content
Controlled
Status: Closed
Confirmation Dialog
Compound Components
For advanced usage, use the exported sub-components: