Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Autocomplete
- Avatar
- Badge
- Bar List
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Checkbox
- Checkbox Group
- Circular Progress
- Collapsible
- Combobox
- Command
- Context Menu
- Currency Input
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Meter
- Multi Combobox
- Native Select
- Navigation Menu
- Number Field
- Pagination
- Phone Input
- Popover
- Progress
- Progress List
- Prompt
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Stat
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Tooltip
- Typography
Loading...
"use client";
import { Button } from "@/components/ui/button";
import { Prompt } from "@/components/ui/prompt";
export function PromptDemo() {
return (
<div className="flex flex-col items-start gap-2">
<p className="text-muted-foreground text-sm">
Permanently remove this workspace and all project data.
</p>
<Prompt>
<Prompt.Trigger asChild>
<Button variant="destructive">Delete workspace</Button>
</Prompt.Trigger>
<Prompt.Content>
<Prompt.Header>
<Prompt.Title>Delete workspace?</Prompt.Title>
<Prompt.Description>
This action cannot be undone. This will permanently delete your
workspace, members, and billing history.
</Prompt.Description>
</Prompt.Header>
<Prompt.Footer>
<Prompt.Cancel>Cancel</Prompt.Cancel>
<Prompt.Action>Delete workspace</Prompt.Action>
</Prompt.Footer>
</Prompt.Content>
</Prompt>
</div>
);
}Installation
npx shadcn@latest add "https://ui.blode.co/r/styles/default/prompt"
Usage
import { Prompt } from "@/components/ui/prompt";<Prompt open={isOpen}>
<Prompt.Content>
<Prompt.Header>
<Prompt.Title>Delete Account</Prompt.Title>
<Prompt.Description>
This action cannot be undone. This will permanently delete your account.
</Prompt.Description>
</Prompt.Header>
<Prompt.Footer>
<Prompt.Cancel onClick={() => setIsOpen(false)}>Cancel</Prompt.Cancel>
<Prompt.Action onClick={() => handleDelete()}>Delete</Prompt.Action>
</Prompt.Footer>
</Prompt.Content>
</Prompt>Props
Root
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | - | Controls the visibility of the prompt dialog. |
children | ReactNode | - | The content to display in the dialog. |
Content, Header, Footer
These are layout components that help structure the dialog content.
Title, Description
Used to display the main text content in the dialog.
Action, Cancel
Button components for confirming or canceling the prompt action.