Preset
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-presetAbout this component
Car radio preset keys, the thing radio buttons are named after: five ivory keys in a dark chrome-trimmed housing. Pressing one latches it down, lights its amber lamp and pops the last one back up.
Triggers
- Click
- State change
- Glow
Techniques
- CSS transition
- Pseudo elements
- Gradient
Difficulty
Beginner
Accessibility
Keyboard and screen readers
Native radios in a fieldset with a visually hidden legend ("Station preset"), each in a <label> and named by aria-label ("Preset 1" to "Preset 5"); the numbers on the caps are aria-hidden. Arrow keys move between them as usual and :focus-visible outlines the cap.
Reduced motion
The transitions are switched off and the key jumps to its latched state.
Use it in anything you build, commercial and client work included. Licence