Inputs & Switches
Checkbox Morph
Three amber rounded checkboxes auto-cycle and respond to clicks; the box fills and a checkmark strokes in via animated dashoffset.
svgmedium complexitymoderate motionclick
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
Worth keeping?
Votes steer what gets built next — sign in to cast one, free to read
When to use it
Settings panels, form demos, or any UI showcase needing a tactile checkbox feel with ambient motion.
When not to
Production forms requiring immediate user control — remove the auto-cycle clock loop before shipping.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change accent from amber to teal (#2dd4bf), increase checkbox count from 3 to 5, and slow the checkmark stroke to 0.10 lerp factor. Theme: dark tokens live in :root, the light variant in :root[data-theme="light"]; ?theme=light or a {type:'forever:theme'} postMessage switches at runtime.
Safe to edit
- accent color (#ffb02e)
- checkbox count (loop 0..3)
- auto-cycle interval (clock%150)
- checkmark lerp speed (0.18)
- corner radius (rx=20)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- IIFE wrapper
- prefers-reduced-motion guard with static checked fallback
- visibilitychange pause
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- Auto-cycles by default — remove the frame loop for production use
- LEN=80 is an approximation; exact path length may cause slight overshoot on the stroke draw
More Inputs & Switches components
- Liquid ToggleSVG toggle with a goo filter — the knob slides with trailing liquid droplets; track color fades between off and on states.
- Glow SliderSVG range slider with a plum-to-teal gradient fill, glowing knob, and a floating value bubble that tracks the handle; auto-oscillates when idle.
- Spring StepperMint-themed +/- stepper with a number reel that springs and overshoots between digits 0–9; auto-cycles as a demo. Dark green palette.
- Segmented ControlSlate-to-sage gradient pill slides between Day/Week/Month/Year segments with elastic spring stretch. Auto-cycles; click pauses briefly.
- Star RatingFive gold stars auto-sweep ratings up and down; the active star pops with a scale bounce. Pointer sets the hover rating instantly.
- OTP BoxesFour teal monospace OTP cells auto-fill digits with a slide-up bounce and blinking caret; sequence clears and loops. Dark background with glow on active cell.