Dichroic
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-dichroicAbout this component
Lighting presets on an optical bench, each row with a small cube of dichroic glass at its left end. The cube you pick turns to catch the light, its faces flash the colour it reflects, and it throws the opposite colour down its ruled rail onto a frosted screen at the far end.
Triggers
- Click
- State change
- 3D
- Glow
- Ambient
Techniques
- preserve-3d
- 3D transform
- Perspective
- clip-path
- Keyframes
- CSS variables
Difficulty
Advanced
Accessibility
Keyboard and screen readers
Native radios in a fieldset with a visually hidden legend ("Lighting"), each in a <label> with its visible name (Daylight, Golden hour, Blue hour); the cube, beam and screen are aria-hidden. :focus-visible outlines the row.
Reduced motion
The cube turns and the beam appears at once, with no rocking or drift.
Use it in anything you build, commercial and client work included. Licence