Priority
Markup where the component goes, CSS in your stylesheet. No JavaScript.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/radio-priorityAbout this component
A priority picker: three rows, each with a flag in its own colour. A tinted highlight glides to the row you pick and changes colour on the way, green to amber to red.
Triggers
- Click
- State change
- Spring
- Icon
Techniques
- CSS variables
- Transform only
- CSS transition
- SVG
Difficulty
Intermediate
Accessibility
Keyboard and screen readers
Native radios in a fieldset with a visually hidden legend ("Priority"), each in a <label> whose visible text is its name (Low, Medium, High); the flags, marks and highlight are aria-hidden. :focus-visible outlines the row.
Reduced motion
The highlight jumps instead of gliding.
Use it in anything you build, commercial and client work included. Licence