This component no longer exists. It was in ns-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-07 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Button Retry Backoff
ns-ui/button-retry-backoffRemovedComponent
A retry button that visibly winds a torsion spring through its backoff — disabled and charging while a --foreground arc grows on real timing, notching every failure, pressable only once fully wound.
Live preview
live · rendered by the registry
Rendered by ns-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://design.helpmarq.com/r/button-retry-backoff.jsonSource
1"use client";23import { useEffect, useId, useRef, useState } from "react";45// TorsionRetry — a retry button that is honest about its rate limit. Idle and6// charged are the only pressable states; a failure winds a torsion spring: a7// 1.5px --foreground arc grows 0->360deg around the icon's --border track on8// LINEAR timing matched exactly to the real backoff delay (no fake easing —9// the visual duration IS the enforced cooldown), while the refresh glyph10// rotates slowly backward as if under tension. Reaching full wind snaps the11// button to "charged": the icon pops with one damped-spring overshoot, the12// glyph un-tenses 5deg forward (a permanent correction, not a bounce-back),13// and the button gains --accent text/border as its one legitimate accent use.14// Every failure also drops a permanent 2px --muted notch tick at a fixed15// angular slot on the ring (1st failure always the same slot, 2nd always the16// next, etc.) — a live history of the episode, not just its current backoff.17// A successful retry resolves the episode: notches and attempt count reset,18// the ring goes fully quiet. Hot-path values (arc offset, glyph rotation,19// settle-spring) are written directly to refs every frame; React state only20// carries status/attempt/caption, so re-renders stay coarse. Under21// prefers-reduced-motion the arc advances in discrete steps with no glyph22// rotation and no overshoot. Zero dependencies, DOM + SVG + CSS only.2324export interface TorsionRetryProps {25 /** called when the user presses Retry once idle/charged; resolve/return26 * false (or throw) to report failure, anything else counts as success */27 onRetry?: () => Promise<boolean> | boolean;28 /** wind duration for the first failure, ms (default 4000 — a real cooldown) */29 baseDelayMs?: number;30 /** multiplier applied per additional consecutive failure (default 2) */31 factor?: number;32 /** upper bound on wind duration regardless of attempt count (default 60000) */33 maxDelayMs?: number;34 /** fixed angular slots the ring can notch before saturating (default 8) —35 * the attempt count in the text description is never capped, only the ring */36 maxNotches?: number;37 /** button label in the idle/charged state (default "Retry") */38 label?: string;39 className?: string;40}4142type Status = "idle" | "checking" | "winding" | "charged";4344const SIZE = 28;45const CENTER = SIZE / 2;46const TRACK_R = 10.5;47const CIRCUMFERENCE = 2 * Math.PI * TRACK_R;48const NOTCH_INNER = 11.25;49// … truncated
