Overview & One-Click Demo

Click Start Recording in the top-right corner, interact with any of the animation playgrounds below, and click Stop Recording to inspect and scrub the timeline—or click Auto-Record Full Showcase below to run an automated sequence across all animation types.

Quick Showcase Runner Records CSS Animations, Transitions, WAAPI, Scroll & DOM Removal
Ready to record

1. CSS Animations (Delays, Iterations & Infinite)

Demonstrates capturing infinite animations already running when recording starts via document.getAnimations(), as well as triggered CSS animations with animation-delay, multiple animationiteration events, animationend, and animationcancel.

CSS Keyframe Actors animationstart · animationiteration · animationend · animationcancel
∞ Orbit
div#infinite-spinner.demo-actor.infinite-orbit

Always running (infinite). Captured immediately when recording starts and paused when visualizing.

Delay + 3× Iter
div#delayed-iter-box.demo-actor.iter-pulse-target

160ms delay, 3 iterations of 260ms each.

2. CSS Transitions

Demonstrates recording transitionrun, the delay segment before transitionstart, and transitionend / transitioncancel. Keyframes are snapshotted while active so completed transitions can be scrubbed backward and forward.

Delayed Multi-Property Transition transitionrun → delay (120ms) → transitionstart → transitionend
Transition Box
div#transition-card.demo-actor.transition-box

Transitions transform and background-color over 360ms after a 120ms delay.

3. Web Animations API (element.animate())

JS-driven animations created with element.animate() do not fire DOM animationstart events—they are captured via document.getAnimations() and our WAAPI hook, including their keyframes, iterations, and computed timing.

WAAPI Keyframe Effect element.animate(keyframes, options)
WAAPI Actor
div#waapi-actor.demo-actor.waapi-box

Runs a 2-iteration alternating keyframe animation via element.animate().

4. Scroll-Driven Animations & Scrollable Containers

Scroll the container below (or click the scroll button) during a recording. The recorder tracks both scrollTop / scrollLeft on the container and the progress of its ScrollTimeline and ViewTimeline animations. Scrubbing the timeline playhead restores both the scroll offset and the animation progress!

Scrollable Container with ScrollTimeline & ViewTimeline ScrollTimeline · ViewTimeline · scrollTop
scrollTop: 0px
ScrollTimeline Progress

Scroll down inside div#scroll-stage.scroll-container ↓

ViewTimeline Reveal Card Animates as it enters & crosses the scrollport

Bottom of scrollable container reached ✓

5. Elements that Animate & Get Removed from the DOM

When a tracked element is disconnected from the DOM (!element.isConnected), its row in the timeline is greyed out, displays a ⚠️ Removed warning indicator, and renders its recorded animation boxes and events as outlines.

Ephemeral DOM Elements !element.isConnected · MutationObserver
Ephemeral Chip #1
Ephemeral Chip #2

6. User Interactions (Clicks & Keyboard Events)

Discrete user interactions (click, keydown, keyup) are recorded with relative timestamps and rendered as color-coded vertical markers on both the target element’s row and the pinned window / document row.

Click & Keyboard Playground click · keydown · keyup

Installation & Usage

Drop <interactions-timeline> into any page to inspect and scrub its animations, transitions, and scroll interactions.

Quick Start ESM / NPM
<script type="module" src="interactions-timeline"></script>

<!-- Optional: explicitly place the custom element (auto-injected if omitted) -->
<interactions-timeline></interactions-timeline>

JavaScript API

In addition to the injected top-right recording button and interactive bottom-sheet scrubber, you can control <interactions-timeline> programmatically:

Programmatic Control Methods & Properties
const visualizer = document.querySelector('interactions-timeline');

// Start and stop recording programmatically
visualizer.startRecording();
const store = visualizer.stopRecording();

// Scrub the page (animations, transitions, and scrollers) to 450ms
visualizer.scrubToTime(450);

// Close or reset the visualizer and unpause all page animations
visualizer.closeVisualizer();
visualizer.reset();