HoldToConfirm
Irreversible actions, with accessible fallbacks.
npx shadcn add @lopifi/hold-to-confirmExamples
The same component, case by case. Each stage is the shipped code with the props it shows; switch to Code for the usage.
Irreversible payment
A wire cannot be recalled, so it takes a deliberate hold, and the typed phrase is the path for anyone who cannot hold.
Typed reference
Typing the entry number, not a generic word, proves the reader is reversing the entry they think they are.
Blocked until resolved
While a flagged duplicate is unacknowledged, both the hold and the typed path are closed.
Longer hold
Signing off a close locks the period, so the hold can be lengthened to match the weight of the decision.
How it behaves
What it renders, what it refuses to render, and why. The same paragraphs as the family spec, so the two can’t disagree.
clip-path: inset() fill, 1500ms linear press, 200ms --ease-out release, scale(0.97) on the button. Slow where the user is deciding, fast where the system is responding.
Accessible alternatives are required: Space to hold with aria-live progress at 0/50/100%, Escape to abort, and a typed-confirmation fallback. Gating a financial action behind a motor skill is an accessibility failure, so hold-to-confirm is never the only path.
More in System & states
See also
Where this component is specified, defined and running.
Elsewhere in the system
The live section HoldToConfirm renders in, the calculators behind its figures, and the ledger payloads that feed it.
- HoldToConfirm, runningThe payments showcase — live, with theme, density, grayscale and reduced-motion switches.
- Writes, concurrency and rate limitsWhat happens when you write, and how fast can you go?
- System & statesEmpty, error, loading, stale and confirm states. They decide whether a product feels finished. Specs for 9 React components: EmptyState, ErrorState, Skeleton, StaleIndicator and 5 more.
Components are copied into your repository and meant to be edited. Rounding policy, fiscal calendar and compliance copy differ per company.
Release notes
Get an email when System & states changes
Your copy doesn’t update itself when we fix something here.
- One email when a System & states component needs a migration
- Nothing when nothing changes
Or install it now