Overlays
Alert dialog
Interrupts with critical context and confirms a single action.
idle
Usage
Anatomy
The parts and how they nest, taken from the preview above.
Examples
Project archive
Remove a project only after reviewing the confirmation.
Recommendations
| Guidance | Practice |
|---|---|
| Do | State the consequence before the confirming action. Name both the action and the safe way to cancel. |
Usage boundaries
| Guidance | Boundary |
|---|---|
| Scope | Reserve interruption for consequential decisions. Use Dialog for ordinary editing tasks. |
API reference
Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.
| Prop | Type | Default | Description |
|---|---|---|---|
| | false | Controls whether the alert dialog is open. |
| | false | Sets the initial state when uncontrolled. |
| | — | Receives open-state changes. |
| | — | Opens the alert dialog; accepts a render target. |
| | — | Provides the modal popup and backdrop. |
| | <div> | Groups the alert title and description. |
| | — | Names the alert for assistive technology. |
| | — | Explains the decision or consequence. |
| | <div> | Groups the available actions. |
| | — | Closes the alert dialog; accepts a render target. |