Skip to content

Hold to Confirm

Press and hold to confirm: a ring fills, the button shakes more and more, and it vibrates on completion. Works with mouse, touch or keyboard.

Plan
Free · MIT
Dependencies
React only
Props
12 (8 adjustable)

Free forever

MIT license, for personal and commercial projects. See installation

Hold to deletePress and hold the button, or the Space key, until the ring is complete.

Made with Furin: Pill Nav · Metal Button · Copy Morph

Props

PropTypeDefaultDescription
childrenReactNode"Hold to delete"Text below while not pressed.
holdingLabelstring"Keep holding…"Text while being held down.
confirmedLabelstring"Deleted"Text once confirmed.
instructionsstring"Press and hold the button, or the Space key, until the ring is complete."Screen-reader instructions (not visible).
durationnumber1200Milliseconds you have to hold.
colorstring"#ff5a64"Color of the ring and the glow.
confirmedColorstring"#34d399"Color of the ring once confirmed.
sizenumber96Diameter of the button, in px.
resetAfternumber2200Milliseconds to return to the initial state after confirming (0 = stays confirmed).
iconReactNode""Custom icon; if missing, a trash can is used.
disabledbooleanfalseDisables the button.
onConfirm() => void""Called when the hold completes.

Installation

Install it

1Install the package

npm i furin-ui

2Import it

import { HoldToConfirm } from "furin-ui";

Also with pnpm add furin-ui, yarn add furin-ui or bun add furin-ui. Each component ships its own CSS and imports it for you.

Dependencies

React
18 or later
Other libraries
none
License
MIT

Each file ships its own CSS: there's nothing else to install.

Keep exploring

  • A polished metal button with a beveled edge and a reflection that follows the cursor.

    Buttons

  • A button whose ripple is born exactly where you click: a luminous wavefront with rings that sweeps out to the farthest corner.

    Buttons

  • A physics-driven handle you drag to the end to confirm; release early and it springs back with a bounce. Accessible as a slider.

    Buttons