Components
Dialog
Modal dialog with title, message body, action buttons, and Escape-to-dismiss.
A modal dialog for confirmations, warnings, and prompts. Supports left/right action navigation and Escape-to-dismiss.
Installation
Usage
Examples
Destructive confirmation
Info dialog (no dismiss)
Custom border
Props
| Prop | Type | Default | Description |
|---|---|---|---|
isOpen | boolean | — | Controls whether the dialog renders (required) |
message | string | — | Body message — supports \n for multi-line (required) |
actions | DialogAction[] | — | Array of { label, value } buttons (required) |
onAction | (action: DialogAction) => void | — | Called when user confirms an action (required) |
onDismiss | () => void | undefined | Called when user presses Escape |
title | string | undefined | Bold title at the top of the dialog |
focus | boolean | true | Whether this dialog captures keyboard input |
borderStyle | BorderStyle | 'rounded' | Border style key from @inkui-cli/core |
theme | InkUITheme | darkTheme | Color theme |