Skip to content

Dialog

A modal task. Focus moves in, the page behind is inert, Escape closes and focus returns to the trigger.

npx dtheo@latest add dialog

When to use

  • Short, focused tasks: create, rename, confirm with input
  • Long forms or side-by-side context: use Sheet
  • Destructive confirmations: use Alert dialog

Keyboard

Escape
Closes the dialog
Tab
Cycles focus within the dialog
  • Every dialog needs a DialogTitle. Inside a ThemeScope it opens in that scope’s theme.

Used in