Duvet

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/toggle-duvet

About this component

A switch quilted like a down jacket: shiny nylon in fat baffles, navy when off, with a black snap fastener for a thumb. On, the nylon turns safety orange, baffle by baffle.

Triggers

  • Click
  • State change
  • Delay stagger
  • Spring

Techniques

  • CSS variables
  • Transition delay stagger
  • Gradient

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

A native checkbox with role="switch" inside a <label>, named by aria-label ("Heated jacket"); everything drawn is aria-hidden, and :focus-visible on the input outlines the switch.

Reduced motion

The transitions and loops stop and the switch jumps straight to its final state.

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

More toggles

See all
FaderGet code
FlatGet code
GlazeGet code
GuardGet code