Component packs › Cogwork › Gear Toggle
The thumb is a pinion rolling along a toothed rack, turning exactly as far as it travels and staying in mesh the whole way.
Gear Toggle is a toggle 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: rack and pinion, no-slip roll, steel to copper.
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 |
|---|---|---|---|
checked | boolean | ||
disabled | boolean | ||
label | string | Accessible name. | |
onChange | (checked: boolean) => void | ||
theme | 'light' | 'dark' | ||
autoplay | number | false | Showcase mode: toggles itself every N ms while visible. |
readonly checked: booleansetChecked(checked: boolean, silent?: boolean): voiddestroy(): voidimport GearToggle from './GearToggle';
<GearToggle />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Skeuomorphic UI.