Component packs › Cogwork › Wind-up Button
Hold to wind: the key turns, the click drops tooth by tooth and the mainspring coils tighter; let go and the spring runs your action.
Wind-up Button is a hold to wind from Cogwork, a component pack with 6 clockwork controls: Controls run by real gears: they mesh, wind, tick and ratchet. Price: $2 for the whole pack.
Built with: visible mainspring, ratchet and click, runs on release.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | Accessible name and the action's name. | |
text | { idle?: string; winding?: string; running?: string; done?: string; short?: string } | Status lines. | |
disabled | boolean | ||
onRun | () => void | Runs when a wound spring is released. | |
theme | 'light' | 'dark' | ||
autoplay | number | false | Showcase mode: winds and releases every N ms while visible. |
run(): void: Winds fully and releases.setDisabled(disabled: boolean): voiddestroy(): voidimport WindUpButton from './WindUpButton';
<WindUpButton />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Skeuomorphic UI.