Component packs › Windsock › Weather-vane Toggle
Switch it and the arrow swings round its spindle from west to east, edge-on as it passes, overshooting and hunting before it settles.
Weather-vane Toggle is a toggle from Windsock, a component pack with 6 wind controls: Controls moved by the wind: flags that fly, a windsock that fills, a vane that swings round. Price: $2 for the whole pack.
Built with: turn in depth, hunting spring, slate ridge.
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 | ||
label | string | ||
disabled | boolean | ||
dark | boolean | ||
onChange | (on: boolean) => void | ||
autoplay | number | false | Showcase mode: switches every N ms while visible. |
readonly checked: booleansetChecked(on: boolean, silent?: boolean): voiddestroy(): voidimport VaneToggle from './VaneToggle';
<VaneToggle />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Notifications and toasts.