Feature Library

Scrubbable keyframe timeline

0.08 CPU ms
A still of the Scrubbable keyframe timeline demo
Still
The live demo starts when it’s in view.Drag a bar, or its end to time it (Alt: no snap) · Space plays · arrows nudge

Scenes as plain data ("move these channels to these values over this long, with this ease"), any moment worked out on demand with no state, and the editor that…

What it costs a frame

0.08 ms
GPU
not used
CPU, median
0.08 ms
CPU, 95th pct
0.13 ms
Draw calls
0
Weight
Light

Measured 7 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 156, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured playing in a loop: each frame works out all nine channels from the scenes (no state kept between frames), the cards three times over for their stagger, writes the scene’s styles and moves the two playheads and the live values. Nothing is laid out again. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring toolnot timed0.080.13
apple · Apple A19 Proin a browser tab · 16 November 2026not timed0.160.42
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed0.230.37

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. Intros, splashes and title sequences
  2. Product tours and onboarding
  3. Motion and video editors
  4. Scripted UI choreography
  5. Cut-scenes and game sequences
  6. Data stories
  7. Effects in a live show that must look the same after a jump back

Pitfalls, in brief

  1. A move starts from where its channel is when it starts, worked out once when the timeline is built: build it again (timeline(def)) after every edit, or later moves start from stale values.
  2. Two moves of one channel that overlap: the later one takes over from wherever the earlier one had got to.
  3. Dragging a bar moves its whole scene (every lane it touches); its right end changes the scene’s length, or only that move’s when the move sets its own over.
  4. outBack overshoots past its target (by about 10%): clamp channels that must stay in range (an opacity, a colour mix) where you use them.
  5. The lane editor and transport read time() every frame but write only when it changed: keep the clock outside them (a Clock, a video’s currentTime, an audio clock) and they follow it.
5 more in brief
  1. Space and the arrows are taken only inside the element you pass as keys, so the page still scrolls; give it a tabindex and focus it on click.
  2. Import timeline.base.css before timeline.css: the base lays out the rows, bars, playhead and scrub and sets the drag cursors; the other is only the look.
  3. An effect draws from its phases’ progress alone: no “where it got to”, no random numbers drawn per frame, no time-based motion that builds up.
  4. A phase runs once on a timeline (0 before its clip, 1 after).
  5. Make every effect up front with effectRuntime (where a GPU renderer can warm it), and hide it while its phases rest (all 0 or all 1: resting()), rather than making and removing it as its clip comes and goes: that is a stall on the frame it appears.
10 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From SpaciousPro. Fully custom code.

Robert Penner, easing equations: The cubic in, out and in-out curves and the back ease (its 1.70158 overshoot) are the well-known forms of his equations.

animationkeyframestimelineeasingscrubbingeditordrag and dropsnappingeffectseffect phasesfamily:phaseprogressdeterministicno dependencies

Near it in the frame