Components
- Accordion
- Action Bar
- Action Toast
- Alert Banner
- Alert Dialog
- Alert
- Alphabet Index
- Amount Field
- Aspect Ratio
- Attachment
- Availability List
- Avatar
- Badge
- Bank Card
- Breadcrumb
- Bubble
- Button Group
- Button
- Calendar
- Camera Frame
- Card Design Picker
- Card Details
- Card Peek
- Card Stack
- Card
- Carousel
- Chart
- Chat Thread
- Checkbox
- Chip Group
- Choice Tile
- Code Block
- Code Dots
- Collapsible
- Combobox
- Command
- Context Menu
- Copy Field
- Countdown
- Country Select
- Data Table
- Date Field
- Date Picker
- Date Range Picker
- Dialog
- Direction
- Document Paper
- Drawer
- Dropdown Menu
- Empty
- Entity Avatar
- Field
- File Trigger
- File Upload Item
- Hover Card
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Key Value
- Keypad
- Label
- Live Region
- Marker
- Message Scroller
- Message
- Money Amount
- Native Select
- Number Field
- Pagination
- Percent Split Editor
- Phone Field
- Popover
- Progress
- QR Code
- Questionnaire
- Radio Group
- Range Histogram
- Rating
- Resizable
- Scroll Area
- Search Field
- Select
- Separator
- Share Bar
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Sortable List
- Spinner
- Status Timeline
- Step Header
- Steps List
- Swipe Row
- Switch
- Table
- Tabs
- Text Field
- Textarea
- Tier Ladder
- Toggle Group
- Toggle
- Token Search Field
- Tooltip
- Trace
- Transaction Row
- Usage Meter
Registry
import { Button } from "@/components/ui/button"
import {
Dialog,
Installation#
pnpm dlx shadcn@latest add @dots/dialog
Usage#
import { Button } from "@/components/ui/button"
import {
Dialog,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog"<DialogTrigger>
<Button>Open</Button>
<Dialog>
<DialogHeader>
<DialogTitle>Are you absolutely sure?</DialogTitle>
<DialogDescription>
This action cannot be undone. This will permanently delete your account
and remove your data from our servers.
</DialogDescription>
</DialogHeader>
</Dialog>
</DialogTrigger>Composition#
Use the following composition to build a Dialog:
DialogTrigger
├── Button
└── Dialog
├── DialogHeader
│ ├── DialogTitle
│ └── DialogDescription
└── DialogFooterCustom Close Button#
Replace the default close control with your own button.
import { Button } from "@/components/ui/button"
import {
Dialog,
No Close Button#
Use showCloseButton={false} to hide the close button.
import { Button } from "@/components/ui/button"
import {
Dialog,
Sticky Footer#
Keep actions visible while the content scrolls.
import { Button } from "@/components/ui/button"
import {
Dialog,
Scrollable Content#
Long content can scroll while the header stays in view.
import { Button } from "@/components/ui/button"
import {
Dialog,
API Reference#
See the React Aria documentation for more information.