Underline

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/checkbox-underline

About this component

Hovering the label draws a line under it; ticking pulls that line back along the text into the box, where it turns into the tick.

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

Triggers4

  • Hover
  • Click
  • State change
  • Draw

Techniques3

  • CSS transition
  • stroke-dashoffset
  • Transform only

Accessibility

Keyboard and screen readers

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

Reduced motion

Nothing animates.

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

More checkboxes

See all
UnravelGet code
USBGet code
VendingGet code
VennGet code