Dialog
Live example
Dialog
Installation
npx shadcn@latest add https://hextech-ui.vercel.app/r/dialog.jsonAPI reference
These are the main Dialog options. See the exported TypeScript types for inherited native or primitive props.
| Prop | Type | Default |
|---|---|---|
open / defaultOpen | boolean (Dialog) | false |
onOpenChange | (open, details) => void | — |
container | HTMLElement | null (DialogContent) | body |
Open state and focus
Use open with onOpenChange for controlled visibility, or defaultOpen for an initial local state. Include DialogTitle and an appropriate description. Escape dismisses a normal dialog; focus returns to its trigger. Portal content inherits the scoped theme.