Dialog
A small, interactive UI element that overlays content to display important information or actions. It appears over the main interface for user interaction.
Installation
Install the component via the CLI in one command.
npx shadcn@latest add @intentui/dialog
Composed components
When you install this component via the CLI, it automatically loads all composed components, so you don’t need to add them individually.
Manual installation
Use this approach if you prefer to install and wire up the component yourself instead of using the CLI.
npm install react-aria-components @heroicons/react tailwind-merge
Component API
Dialog
The Dialog component is the accessible dialog container.
| Prop | Type | Default |
|---|---|---|
className | string | - |
DialogBody
The DialogBody component wraps the main dialog content.
| Prop | Type | Default |
|---|---|---|
className | string | - |
DialogCloseIcon
The DialogCloseIcon component renders the dialog close icon button.
| Prop | Type | Default |
|---|---|---|
className | string | - |
isDismissable | boolean | undefined | - |
DialogClose
The DialogClose component renders a button that closes the dialog.
| Prop | Type | Default |
|---|---|---|
className | string | - |
intent | "primary" | "secondary" | "warning" | "danger" | "success" | "outline" | "plain" | plain |
DialogDescription
The DialogDescription component renders supporting text inside a dialog.
| Prop | Type | Default |
|---|---|---|
className | string | - |
DialogFooter
The DialogFooter component groups dialog actions.
| Prop | Type | Default |
|---|---|---|
className | string | - |
DialogHeader
The DialogHeader component groups the dialog title and description.
| Prop | Type | Default |
|---|---|---|
className | string | - |
description | string | - |
title | string | - |
DialogTitle
The DialogTitle component renders the dialog heading.
| Prop | Type | Default |
|---|---|---|
className | string | - |
DialogTrigger
The DialogTrigger component defines the element that opens a dialog.
| Prop | Type | Default |
|---|---|---|
className | string | - |
See the React Aria for the full API reference.
Unlock the full power ofIntent UI Design
Build modern web apps faster with 1000+ resources across components, blocks, patterns, templates, and starter kits.