AlertDialog
Confirmation dialog requiring an explicit user decision before a destructive or irreversible action proceeds.
Examples
Basic confirm
Simple confirm / cancel dialog.
Destructive
High-stakes dialog with a destructive action.
With form
Dialog that collects input before confirming.
With long content
Scrollable content area for terms, policies, or detail.
Installation
pnpm add @rokle/components @rokle/tokensInstalls with the default Rokle brand. Generate a custom brand on rokle.app to use your own colours and personality.
Usage
import { AlertDialog } from "@rokle/components";import { AlertDialog } from "@rokle/components";
export function Example() {
return <AlertDialog />;
}API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| open | boolean | - | Whether the dialog is visible. |
| title | string | - | Dialog heading text. |
| description | string | - | Body text explaining the action. |
| onConfirm | () => void | - | Called when the confirm action is triggered. |