Elements
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initRadioElements(el) on the mounted element instead.
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-elementsAbout this component
Pick an element: three gems, Flame, Volt and Void, each holding its own light; the picked one lifts and erupts in its own way (fire sprays up, volt crackles out, void pulls in and bursts) and the glow behind the group takes its colour.
Triggers
- Click
- State change
- Glow
Techniques
- clip-path
- Radial gradient
- requestAnimationFrame
- CSS variables
Difficulty
Advanced
Accessibility
Keyboard and screen readers
Native radio inputs inside <label>s in a <fieldset> named "Element"; each label shows the element's name.
Reduced motion
The choice changes without effects.
Use it in anything you build, commercial and client work included. Licence