The living catalog

Instruments07/10

HoldToStrike

G4G5

G4 as a behavior: hold ~600ms while the fill sweeps, release early cancels, completion strikes — and the CALLER announces with Undo. A hook for any control plus the ready-made StrikeButton.

Posture

Hold ~600ms — release early to cancel

npx candlelight-ds add hold-to-strike

Use when

Deleting one thing — a row, an object, a pad. Wrap menu items and icon buttons with the hook.

Don't use when

Cascade deletes — those earn a typed-confirm Overlay.

States
resting (cold danger outline)holding (linear fill sweep)released early (sweep snaps back)struck
Keyboard
  • Enter/Space heldsame hold; keyup cancels — the keyboard path is first-class
Acceptance
  • Release before the threshold never strikes.
  • Completion fires exactly once and suppresses the trailing click.
  • Every strike is announced with Undo at the call site — undo is a deferred commit, not a restore.

Raw twin: /components/hold-to-strike.md·Registry item: /r/hold-to-strike.json