Alert Dialog
A confirm dialog in the same rounded style, with pill actions and a destructive option.
Interactive preview · desktop · dark
Installation
Installation is available on the Startup and Business plans. Your personal install command appears here once you have access.
Usage
Import it, pass your props, and make it part of your product.
example.tsx
import { Button } from '@/components/ui/button';import { AlertDialogRounded } from '@/components/component-kit/items/alert-dialog-rounded';
export function Example() { return ( <AlertDialogRounded trigger={<Button variant="outline">Delete chat</Button>} title="Delete chat?" description="This removes the conversation for everyone. It cannot be undone." confirmLabel="Delete" destructive onConfirm={() => console.log('deleted')} /> );}Props
| Prop | Type | Default | Description |
|---|---|---|---|
trigger | ReactElement | — | Element that opens the dialog. |
title | ReactNode | — | Dialog heading. |
description | ReactNode | — | Supporting text under the heading. |
destructive | boolean | false | Style the confirm action as destructive. |
onConfirm | () => void | — | Confirm handler. |