Tube
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initToggleTube(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-tubeAbout this component
A glass tube switch: switching on pours blue liquid in behind the cap as it slides across, the surface sloshing up against it and a few bubbles rising; off drains it back.
Triggers
- Click
- State change
- Fill
Techniques
- Keyframes
- CSS transition
- border-radius
Difficulty
Advanced
Accessibility
Keyboard and screen readers
A native checkbox with role="switch" inside a <label>, named by aria-label ("Hydration reminders").
Reduced motion
The transitions and loops stop and the component jumps straight to its final state.
Use it in anything you build, commercial and client work included. Licence