Unravel

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/checkbox-unravel

About this component

The box is a single line. Ticking it, the outline unwinds back into one corner and the same line pays out of that corner as the tick; unticking winds it back round.

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

Triggers4

  • Click
  • State change
  • Draw
  • Morph

Techniques3

  • SVG stroke
  • stroke-dashoffset
  • CSS transition

Accessibility

Keyboard and screen readers

A native checkbox inside a <label>, so the text names it and Space toggles it; :focus-visible outlines the drawing, which is aria-hidden.

Reduced motion

It changes at once.

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

More checkboxes

See all
USBGet code
VendingGet code
VennGet code
WaveGet code