Pastel

Interests
No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/checkbox-pastel

About this component

A frosted glass card of three choices, each with its own pastel: ticking a row lays a strip of tinted glass behind it and fills its box with the colour; unticking lets the strip slide away.

Triggers

  • Click
  • State change
  • Fill

Techniques

  • CSS transition
  • stroke-dashoffset
  • CSS variables

Difficulty

Beginner

Accessibility

Keyboard and screen readers

Three native checkboxes in a fieldset with a visually hidden legend ("Interests"), each in a <label> with its visible text.

Reduced motion

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

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

More checkboxes

See all
SoapGet code
Add-onGet code
Auto-clickGet code
CaptionsGet code