Toggle Sidebar B
AppearanceLight & dark mode D

Hold Button

Hold-to-confirm button whose liquid fill rises while pressed, snaps back on an early release and swaps its label through a blur when the hold completes.

Default

Press and hold the button, with the pointer or with Space or Enter. Releasing early snaps the fill back.

Dark previewReplay previewOpen in new tab

Customize

Action
Fill
Background
Text
Text On Fill
Size
Radius14px
Fill Direction
Hold Time2000ms
Release200ms
Press Scale0.97
Wave Size6px
Reset After1200ms

API Reference

HoldButton

PropTypeDefaultDescription
doneLabelstring'Deleted'Label that blurs in when the hold completes.
backgroundColorstring'#27272a'Button body colour.
fillColorstring'#5227FF'Colour of the liquid fill, its wave, the glow and the focus ring.
textColorstring'#f5f5f5'Label colour outside the fill.
fillTextColorstring'#ffffff'Label colour inside the fill. The ink inverts as the edge crosses it.
size'sm' | 'md' | 'lg''md'Height, padding and font size preset.
radiusnumber14Corner radius in pixels of the body, the fill and the focus ring.
fillDirection'right' | 'up''right'Whether the liquid sweeps left to right or rises from the bottom.
holdTimenumber2000How long the press must last, in milliseconds. The fill moves at constant speed.
releaseTimenumber200How fast the fill snaps back on an early release or a reset, in milliseconds.
pressScalenumber0.97Squash of the button while a pointer holds it. 1 disables it.
wavebooleantrueScrolling meniscus on the leading edge of the fill.
waveAmplitudenumber6Height of the wave crests in pixels.
glowbooleantrueGlow that charges with the hold and pulses once on completion.
resetAfternumber1200Milliseconds the done state stays before the button resets. 0 keeps it done.
disabledbooleanfalseDims the button and ignores input.
EventDescription
holdEmitted once, on the frame the fill completes.
tapEmitted on a release shorter than 250ms that did not drift away.
SlotDescription
defaultLabel shown while idle and holding. Defaults to "Hold to delete".
iconOptional icon rendered before the idle label.
done-iconOptional icon rendered before the done label.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
Space + EnterHold to fill the button. Release early to cancel.
EscapeCancels a hold started with the keyboard.
  • A visually hidden hint, linked with aria-describedby, tells screen reader users how long to hold.
  • With prefers-reduced-motion the wave and the squash are dropped and the fill fades in instead of sweeping.