Mood

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/radio-mood

About this component

How was it? Five faces from a deep frown to a big grin. The chosen face springs up larger, fills in light with its features turning dark, and its mouth gives a little bounce while its name rises in underneath; the others stay small and dim. Pure CSS.

Triggers

  • Click
  • State change
  • Spring
  • Icon

Techniques

  • SVG
  • Keyframes
  • Spring

Difficulty

Beginner

Accessibility

Keyboard and screen readers

Real native radios (visually hidden: absolute, 1x1, opacity 0) inside <label>s in a role="radiogroup" with an aria-label, so arrow keys, focus and screen readers work.

Reduced motion

The changes are instant.

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

More radios

See all
SeatGet code
ShapeGet code
SizesGet code
StarsGet code