Tide
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/toggle-tideAbout this component
A dark mode switch whose track is a window onto the sea: a peach sunset with clouds and a small boat; switching to night slides the dark thumb across, sinks the sun into the sea, raises the moon on the other side with its path of light and brings out the stars.
Triggers
- Click
- State change
- Ambient
- Loop
Techniques
- SVG
- Keyframes
- CSS transition
- Transform only
Difficulty
Advanced
Accessibility
Keyboard and screen readers
A native checkbox with role="switch" inside a <label>, named by aria-label ("Dark mode"); the scene and thumb are aria-hidden, and :focus-visible on the input outlines the frame.
Reduced motion
The scene swaps without moving and the ambient loops stop.
Use it in anything you build, commercial and client work included. Licence