Components
Dialog
A modal dialog that interrupts the user with important content and expects a response.
Demo
Code
Open Dialog
Installation
Usage
Basic Usage
Controlled State
With Form Content
Confirmation Dialog
API Reference
Dialog
Root component that manages dialog state.
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | — | Controlled open state |
onOpenChange | (open: boolean) => void | — | Callback when state changes |
children | ReactNode | Required | Dialog content |
DialogTrigger
Button that opens the dialog.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Trigger element |
DialogContent
The modal content container.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Dialog content |
className | string | — | Additional classes |
DialogHeader
Container for title and description.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Header content |
className | string | — | Additional classes |
DialogTitle
The dialog title.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Title text |
className | string | — | Additional classes |
DialogDescription
Description text below the title.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Description text |
className | string | — | Additional classes |
DialogFooter
Container for action buttons.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Footer content |
className | string | — | Additional classes |
DialogClose
Closes the dialog when pressed.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Close trigger |