Utility
AI
Terminal
confirm-demo
No opentui live preview is registered for this example yet.
Installation
pnpm dlx shadcn@latest add @termcn/confirm
Usage
import { Confirm } from "@/components/ui/confirm";<Confirm
message="Are you sure you want to continue?"
onConfirm={() => console.log("Confirmed")}
onCancel={() => console.log("Cancelled")}
/>API Reference
Confirm
| Prop | Type | Default |
|---|---|---|
message | string | required |
onConfirm | () => void | undefined |
onCancel | () => void | undefined |
confirmLabel | string | "Yes" |
cancelLabel | string | "No" |
defaultValue | boolean | false |
variant | "default" | "danger" | "default" |