Plankton
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initTogglePlankton(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/toggle-planktonAbout this component
A night light switch on a strip of dark sea: pushing the wet pebble through the water stirs the plankton, which flash blue-green in its wake and stay twinkling while on; off, they flash once more and go dark.
Triggers
- Click
- State change
- Glow
- Delay stagger
- Ambient
Techniques
- Keyframes
- CSS variables
- Stagger
- Radial gradient
Difficulty
Advanced
Accessibility
Keyboard and screen readers
A native checkbox with role="switch" inside a <label>, named by aria-label ("Night light"); the water and pebble are aria-hidden, and :focus-visible on the input outlines the frame.
Reduced motion
The pebble jumps and the sparks show without flashing or twinkling.
Use it in anything you build, commercial and client work included. Licence