Standby

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/toggle-standby

About this component

A power switch with a charcoal thumb in a deep well: off, the uncovered end glows amber and breathes slowly like a standby light; on, it glows steady green. The thumb's fifteen dots are LEDs that catch the colour, brightest by the glowing edge, lighting up column by column once it lands.

Triggers

  • Click
  • State change
  • Glow
  • Delay stagger

Techniques

  • Radial gradient
  • CSS variables
  • Transition delay stagger
  • Keyframes
  • Pseudo elements

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

A native checkbox with role="switch" inside a <label>, named by aria-label ("Power"); the frame, glow and thumb are aria-hidden, and :focus-visible on the input outlines the frame.

Reduced motion

The thumb jumps, the glow switches without fading and the amber stops breathing.

Use it in anything you build, commercial and client work included. Licence

More toggles

See all
TideGet code
TileGet code
TubeGet code
AmberGet code