Chips

Amenities
No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/checkbox-chips

About this component

Filter chips: three pills you can pick any number of. A picked chip fills with its own colour, widens a little and a tick slides in ahead of its label.

Triggers

  • Click
  • State change
  • Fill
  • Draw
  • Spring

Techniques

  • CSS variables
  • SVG
  • stroke-dashoffset
  • CSS transition

Difficulty

Beginner

Accessibility

Keyboard and screen readers

A <fieldset> with a visually hidden <legend> ("Amenities"); each chip is a <label> round a native checkbox, named by its visible text ("Wi-Fi", "Pool", "Pets"). The tick is aria-hidden, and :has(:focus-visible) outlines the chip.

Reduced motion

Every transition and animation is switched off, so it jumps straight to its final state.

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

More checkboxes

See all
ChromeGet code
CrayonGet code
CrownGet code
DauberGet code