Candles
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-candlesAbout this component
Three pillar candles of different heights. Picking one lights it: the flame springs up and flickers, the top of the wax glows through, and the candle that was lit goes out.
Triggers
- Click
- State change
- Glow
- Loop
Techniques
- Keyframes
- Radial gradient
- border-radius
- CSS variables
- Pseudo elements
Difficulty
Intermediate
Accessibility
Keyboard and screen readers
Native radios in a fieldset with a visually hidden legend ("Candle"), each in a <label> and named by aria-label (Coral, Teal, Mustard); the candles are aria-hidden. :focus-visible outlines the candle.
Reduced motion
The flicker is switched off and the flame is shown still.
Use it in anything you build, commercial and client work included. Licence