Crayons

Crayon
No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/radio-crayons

About this component

A box of wax crayons, tips up. The one you pick slides up out of the box, paper wrapper and all, and the last one drops back in line.

Triggers

  • Click
  • State change
  • Hover
  • Spring

Techniques

  • Transform only
  • clip-path
  • Pseudo elements
  • CSS variables

Difficulty

Beginner

Accessibility

Keyboard and screen readers

Native radios in a fieldset with a visually hidden legend ("Crayon"), each in a <label> and named by aria-label (the colour name); the drawing is aria-hidden. :focus-visible outlines the crayon.

Reduced motion

The transitions are switched off and the crayon is simply shown raised.

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

More radios

See all
Seating
DecoGet code
Colour palette
DialogGet code
Visibility
Dog-earGet code
Typeface
E-inkGet code