Server rendering

Motion · Next.js

A banner that arrives before the JavaScript

The season's banner, rendered on the server: Motion starts its entrance once React has hydrated the page, so it waits for the JavaScript, and never plays without it.

With Wardic: Solid 1 · Solid 2

Live demo
The Lagoon Vase

New this season

Glazes that ran in the kiln

Two glazes poured over each other, left to find their own way in the heat. No two came out alike.

See the pieces

No JavaScript on this page: what you see is the server's HTML and CSS alone.

Reduced motion: The photo and lines still fade in one after another, but nothing rises or settles. Before the JavaScript, the page's CSS follows your system's reduced-motion setting; the header's switch counts once the JavaScript has run.

Beside Wardic

The code is the same; what the server sends isn't. Motion renders each element at its initial on the server, and starts the entrance once React has hydrated the page: until the JavaScript has loaded, the banner is blank, and with no JavaScript it stays that way. Try the links on Motion's page: held back 2 s, its banner starts at 2 s. Motion's nearest is its optimised appear animations (startOptimizedAppearAnimation), made for Framer's sites, which need an inline script of your own to start them, and do nothing without JavaScript.

The code

Highlighting…