Dialog

Dialog with accessible presentation and local state.

Installation

Install the shared package once in your Exact app. This version is a beta.
bun add --exact @rightui/ui@0.4.0-beta.4
The Exact compiler requires Bun 1.4.2, regardless of which package manager installs the package.
Complete the font, app metadata and root provider setup (required for both installation methods).
Import
use Dialog, DialogContent from "@rightui/ui"

Usage

Use Dialog for a confirmation footer or DialogContent for custom actions. Set initialFocus, pass the tabbable control IDs in order, and restore focus to the trigger on dismissal.

API Reference

Properties from the component source. State lives in your component; actions receive the updated value.
DialogContent.id
string
DialogContent.open
bool
DialogContent.reduced
bool
DialogContent.title
string
DialogContent.description
string
DialogContent.focusIds
string[]
DialogContent.initialFocus
string
DialogContent.dismiss
action
DialogContent.showCloseButton
bool
DialogContent.rtl
bool
Dialog.id
string
Dialog.open
bool
Dialog.reduced
bool
Dialog.title
string
Dialog.description
string
Dialog.confirmLabel
string
Dialog.focusIds
string[]
Dialog.dismiss
action
Dialog.confirm
action