React Typed Confirmation Dialog

A guard for destructive actions: the confirm button stays disabled until the user types an exact phrase — usually the resource name — the way GitHub gates repository deletion. The input turns green on an exact match, Enter confirms, and Escape or the overlay cancels. Controlled via open / onOpenChange.

Danger zone

Permanently delete the hakursn/aes-core repository. This cannot be undone.

Installation

npx shadcn@latest add "https://kelvinui.com/registry/typed-confirm.json"

Props

PropTypeDescription
openbooleanWhether the dialog is shown
onOpenChange(open: boolean) => voidOpen/close handler
onConfirm() => voidFires only when the typed phrase matches exactly
phrasestringThe exact text the user must type
titlestringDialog title
descriptionReactNodeConsequences of the action
promptstringInstruction with a {phrase} placeholder

New components every week

Get the week's new Kelvin UI components and templates in one short email. No spam, unsubscribe anytime.