Drag & Reorder
Split Pane
Two color-coded panes (amber/pink) split by a draggable cyan divider; the divider springs to position with grip squash, auto-sweeping gently when idle.
cssmedium 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
Code editors, comparison views, side-by-side content layouts, or any UI demo needing a resizable split panel.
When not to
Contexts where the auto-sweep demo loop is distracting — remove the phase loop and set demo=false for production use.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change accent color from cyan (#22d3ee) to purple (#a855f7) by updating --ac in :root, and slow the demo sweep by changing phase+=0.012 to phase+=0.006. 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 (--ac CSS variable)
- spring constants (K=0.16, D=0.78)
- demo sweep speed (phase+=0.012)
- min/max split limits (MIN=14, MAX=86)
- pane colors (--l and --r CSS variables)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- IIFE wrapper
- prefers-reduced-motion guard with static fallback
- visibilitychange pause/resume
- pointer capture on bar for smooth drag
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- Auto-cycles by default — set demo=false and remove the phase block for production
- pane widths hardcoded at 50% with scaleX trick; content inside panes clips at edges
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.
- Dual RangeCanvas dual-range slider with two spring-driven thumbs (white lo, amber hi), hatched fill, delta readout, and tick marks. Auto-breathes when idle.