Component packs › Windsock › Weather-vane Toggle

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.

Weather-vane Toggle props

PropTypeDefaultDescription
checkedboolean
labelstring
disabledboolean
darkboolean
onChange(on: boolean) => void
autoplaynumber | falseShowcase mode: switches every N ms while visible.

Methods on the ref

Use it in React

import VaneToggle from './VaneToggle';

<VaneToggle />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Windsock

Good for: Notifications and toasts.