Components
- Accordion
- Alert Dialog
- Alert
- Autocomplete
- Avatar
- Badge
- Button Group
- Button
- Card
- Carousel
- Chart
- Checkbox
- Clipboard
- Collapsible
- Combobox
- Command
- Context Menu
- Date Picker
- Dialog
- Editable
- Field
- File Upload
- Floating Panel
- Hover Card
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Marquee
- Menu
- Native Select
- Number Input
- Pagination
- Popover
- Progress
- QR Code
- Radio Group
- Rating Group
- Scroll Area
- Select
- Separator
- Sheet
- Skeleton
- Slider
- Spinner
- Splitter
- Steps
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle Group
- Toggle
- Tooltip
- Tour
- Tree View
A modal window that appears on top of the main content. To display important content to the user.
Built on top of the Dialog component. Check it out for more examples.
Installation
pnpm dlx shadcn@latest add @shark-ui/alert-dialog
Usage
import { AlertDialog, AlertDialogTrigger, AlertDialogContent, AlertDialogBody, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, AlertDialogHeader, AlertDialogFooter, } from "@/components/ui/alert-dialog";
<AlertDialog> <AlertDialogTrigger>Open dialog</AlertDialogTrigger> <AlertDialogContent> <AlertDialogHeader> <AlertDialogTitle>Dialog Title</AlertDialogTitle> <AlertDialogDescription>Dialog Description</AlertDialogDescription> </AlertDialogHeader> <AlertDialogBody> {/** Your content here */} </AlertDialogBody> <AlertDialogFooter> <AlertDialogCancel>Close</AlertDialogCancel> <AlertDialogAction>Action</AlertDialogAction> </AlertDialogFooter> </AlertDialogContent> </AlertDialog>
Examples
Destructive action
API Reference
See the Dialog component API reference for the available props.