Confirm morph
A destructive action that morphs into its own confirmation. The question drains a timer along its foot and the undo drains a ring; both pause while you are inside, and focus stays with the control as it changes.
When to use
- Deleting or removing one thing where a dialog would be heavy.
- You want pending, done, error and undo states in one control.
When not to use
- The action is routine and harmless; use a button.
- The action is catastrophic; use hold to confirm or a dialog.
Installation
pnpm dlx shadcn@latest add @caliper/confirm-morph
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
ConfirmMorph
18 props
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes group semantics, with aria-hidden, aria-busy, aria-label and aria-live kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/confirm-morph.mdThe index of every part is at /llms.txt.