Inputs & Switches
Glow Slider
SVG range slider with a plum-to-teal gradient fill, glowing knob, and a floating value bubble that tracks the handle; auto-oscillates when idle.
svgmedium complexitymoderate motionpointer
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, volume/brightness controls, or any numeric input needing a high-contrast neon aesthetic on dark backgrounds.
When not to
Light-background UIs (background hardcoded dark plum). Production use requires wiring a real value-change callback and removing the auto-oscillation loop.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change the gradient from plum-teal to amber-gold by updating the two stop-color values in #fill to #A68D3F and #BFA98C, and slow the oscillation by changing t*0.018 to t*0.010. 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
- gradient colors (stop-color in #fill linearGradient)
- oscillation speed (t*0.018)
- oscillation amplitude (0.42)
- glow blur radius (feGaussianBlur stdDeviation)
- knob radius (r=9)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- IIFE wrapper
- prefers-reduced-motion guard
- visibilitychange pause
- bubble clamp logic (Math.min/Math.max on bx)
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- Auto-oscillates by default — remove the !manual sine loop for production use
- Not keyboard accessible (no input[type=range] underneath)
- Light re-theme via the [data-theme=light] token block; catalog bg/accent describe the dark default
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.
- 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.
- Checkbox MorphThree amber rounded checkboxes auto-cycle and respond to clicks; the box fills and a checkmark strokes in via animated dashoffset.
- 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.