uibrik

Inline Confirm

Preview

Customize

Color
Timeout4.0s
Medium
Start
Radius12px

Usage

import { InlineConfirm } from "@/components/uibrik/inline-confirm/inline-confirm";

<InlineConfirm />

Installation

npx shadcn@latest add https://uibrik.com/r/inline-confirm.json
Adds the files to components/uibrik/inline-confirm and installs @tabler/icons-react, motion and react-use-measure. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/inline-confirm.

Props

InlineConfirm
label
Type string
"Delete"
Button text.
confirmLabel
Type string
"Confirm"
cancelLabel
Type string
"Cancel"
color
Type string
"#dc2626"
Colour of the destructive action.
timeout
Type number
4
How long an unanswered prompt waits before backing out. 0 waits forever.
size
Type "sm" | "md" | "lg"
"md"
Height, padding and text size.
icon
Type boolean
true
Show the trash icon beside the label.
cancelSide
Type "start" | "end"
"start"
Which side Cancel grows out on.
radius
Type number
12
Corner radius.
onConfirm
Type () => void
–
Called when the action is confirmed.
className
Type string
–
Classes for the wrapper.