Chalk

Rating
No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/radio-chalk

About this component

A one to five rating scale drawn in chalk on a framed board. The number you pick is rubbed full of yellow chalk from the middle out, and a little dust falls from it.

Triggers

  • Click
  • State change
  • Fill
  • Keyframe

Techniques

  • clip-path
  • Keyframes
  • Pseudo elements
  • CSS transition

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

Native radios in a fieldset with a visually hidden legend ("Rating"), each in a <label> and named by aria-label ("1 out of 5" to "5 out of 5"); the chalk numbers and dust are aria-hidden. :focus-visible outlines the ring.

Reduced motion

The fill appears at once and no dust falls.

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

More radios

See all
Plan
ChoiceGet code
Honey
CombGet code
Answer
ComicGet code
Crayon
CrayonsGet code