Animation Engine

Page Timelines

Keyframe the real elements of your page on a timeline, right in the Live Editor (switch it to Animate), with springs among the curves, and the page playing it as you work. A timeline plays on page load, when an element scrolls into view, on hover or on click, on the devices you choose. Saved on the page, played by a 4 KB runtime that loads only where there is a timeline. (Beta.)

Live demo

See it in action

In view

Three cards, one after another

One timeline, three tracks. Each card rises, fades in and grows to full size, 0.15 s after the one before, on the Pop over spring, so it passes its mark and settles back. It plays when the first card is 30% in view.

Rise

Rise

Move Y from 40% of its height to 0.

Fade

Fade

Opacity from 0 to 1, on the same keyframes.

Settle

Settle

Scale from 0.94 to 1, springing past it first.

Hover

One trigger, two elements

Point at the card: it lifts, grows and tilts, and the note beside it slides into full view. Move away and both play back. A timeline can move any element on the page, not only the one that starts it.

Hover this card

Hover this card

Move Y −6%, Scale 1.04, Rotate −1.5°, on Pop over.

Moved by the card

This note follows it

Move X and Opacity, on Soft land.

Every element with a class

One track, four tiles

The four tiles share the class pt-tile, so one track moves them all: each starts 0.12 s after the one before, from the centre out. Add a fifth tile with the same class and it joins in, with nothing to change.

Plan

Plan

Tile 1 of 4.

Build

Build

Tile 2 of 4.

Launch

Launch

Tile 3 of 4.

Grow

Grow

Tile 4 of 4.

Scroll

Pinned while you scroll

This section holds in place for a screen and a half of scrolling while the card crosses it: the scroll position is the playhead. Scroll back up and it plays back.

Scroll me

Scroll me

Move X −60% → 60%, Rotate −10° → 10°, Scale 0.85 → 1.

Plays on: Scroll

Pinned for 1.5 screens

The section is the element that scrolls by; Pin it holds it at the top of the screen while the timeline runs.

Click

Forward, then back

With Clicks go forward, then back, each click plays the timeline the other way, like a toggle.

Click this heading

This panel drops in, fades in and comes into focus (Blur from 1 to 0). Click the heading again and it plays back out.

How to set it up

Add it in under a minute

  1. Open the page in the Live Editor and switch its toolbar from Design to Animate: a timeline docks under the page.
  2. Select an element and click Animate this element in the panel on the right. It gets a first move to change.
  3. Move the playhead and change a value (Move X / Y, Scale, Rotate, Opacity, Blur): it is keyed there. Click a keyframe’s diamond to pick the curve into it. Play or scrub: the page follows.
  4. To move every element like it at once, give them a class (Advanced › CSS class) and use Animate every “.class”, with a stagger and an order.
  5. Choose what plays it (Plays on: page load, in view, hover, click, or scroll, pinned or not) and the devices it Runs on.
  6. Click Save. Visitors get it at once; Import / Export moves timelines to another page or site.

Free & open source

Build with this element, free.

Install the framework and the Bootstrap 5 theme, then drag this element into any page.