Rumple

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/toggle-rumple

About this component

A dust cover switch on a cloth runner: the thumb is a block pushed along the cloth, which rucks up into folds in front of it as it slides and smooths out again when it stops.

Dependencies
None
Difficulty
Intermediate
Reduced motion
Respected
Theme
Light and dark
Follows page color-scheme

Triggers3

  • Click
  • State change
  • Keyframe

Techniques3

  • Keyframes
  • Gradient
  • Transform only

Accessibility

Keyboard and screen readers

A native checkbox with role="switch" inside a <label>, so Space toggles it and the visible text names it; :focus-visible on the input outlines the track, which is aria-hidden.

Reduced motion

The block moves without rucking the cloth.

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

More toggles

See all
SerpentineGet code
SettleGet code
SlabGet code
SlackGet code