Drag & Reorder
Dual Range
Canvas dual-range slider with two spring-driven thumbs (white lo, amber hi), hatched fill, delta readout, and tick marks. Auto-breathes when idle.
canvasmedium complexitysubtle 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
Price range filters, date-span pickers, audio EQ bands, any UI needing a two-bound numeric input with tactile spring feel.
When not to
Contexts requiring native form submission — values live only in JS. Not suitable where accessibility auditors require a true input[type=range].
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change accent color from cyan to purple by setting --dr07-acc to #a855f7 and updating ctx.strokeStyle on the filled segment to match. 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 (--dr07-acc / ctx.strokeStyle #22d3ee)
- initial lo/hi values (lo.v=32, hi.v=68)
- spring stiffness (k=0.18) and damping (damp=0.74)
- idle timeout before demo resumes (IDLE=2600)
- hatch step density (step=12)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- setPointerCapture for drag continuity
- IIFE wrapper
- reduced-motion static-frame branch
- visibilitychange pause/resume
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- Values not exposed as a real form input — wire lo.v/hi.v to hidden inputs for form use
- Spring physics means displayed value lags target during fast drags
- Auto-demo resumes 2.6 s after last interaction — remove demo() call if shipping as a real control
More Drag & Reorder components
- FLIP Reorder7-row list reorders via FLIP spring physics on drag or arrow-key input; lifted card gains glow outline while others spring to new slots. Auto-demos when idle.
- Kanban MoveThree-column kanban board where a cyan card lifts and spring-animates between lanes via FLIP. Auto-demos on a timer; supports arrow keys and horizontal drag.
- Pull to RefreshA 5-row canvas list springs down on drag, revealing diagonal bars and a rotating geometric indicator; releasing past threshold triggers a 1.5s sync spinner.
- Sortable Grid3x3 grid of colored numbered tiles that spring-animate into position as tiles are dragged or swapped; auto-shuffles on idle as a demo.
- Snap SliderOchre-accent range slider with 9 tick detents; thumb flicks with spring momentum and rubber-bands at ends. Self-demos on idle, accepts keyboard input.
- Carousel ThrowSeven colored cards orbit a glowing hub in a radial ring; drag to fling with angular inertia, release to snap to the nearest card under the marker.