Felt

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/checkbox-felt

About this component

A craft felt checkbox: a mustard square cut with pinking shears and tacked down with a white running stitch. Ticking it presses a tick cut from teal felt onto it, which lands slightly askew and settles, as a hand-placed piece does.

Triggers

  • Click
  • State change
  • Spring

Techniques

  • clip-path
  • Radial gradient
  • SVG
  • CSS transition

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

A native checkbox inside a <label>, named by aria-label ("Handmade"); everything drawn is aria-hidden, and :focus-visible on the input outlines the felt square.

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
Flip-dotGet code
GiltGet code
GouacheGet code
HazardGet code