Underline
Markup where the component goes, CSS in your stylesheet. No JavaScript.
HTML
CSS
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/checkbox-underlineAbout 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