Examples

Wardic Northlight is a made-up ceramics shop whose every feature is an example. Each page has the feature to use, why it's worth reaching for, what reduced motion does to it, and its code. The shop runs on Solid 2 and on Foldkit, each its own app with its own code; most examples are on both.

Each guide links its own examples at its end, under "In the storefront".

Entrances

How the shop arrives: lists and grids that reveal in order.

Layout

Elements that move and resize as the page changes around them.

Many at once

Hundreds of like elements moving as one: a Batch, where each change is one for all of them.

  • A glaze library of 288 swatches: Filter the studio's glazes by family, sort them by colour or shuffle them: every swatch moves to its new place in one change, in a wave.
  • Search the studio's archive, 600 pieces: Type to search 600 pieces from forty years of firings: the ones that stop matching leave together, and the rest close up in one change.
  • The studio's year, as a chart: Each of the 288 glazes a point: switch the measure and every point moves in one wave; pick a family and the rest shrink away.

Gestures

Hover, press, drag and swipe, with the momentum of the hand.

  • Notifications you swipe away: Throw a notification aside and it flies off; for four seconds you can undo it, then it's gone and the rest close the gap. (on Foldkit)
  • A shortlist, in your order: Drag a piece up or down the list, or move it with the keyboard: the others make room, and each row shows its place.
  • Side by side, in the order you compare them: Three pieces in a row: drag one past another to compare them your way.
  • A shelf arranged in a grid: Eight pieces on a shelf: drag one anywhere, and the rest shuffle along the rows to make room.
  • A wishlist you rearrange by hand: Drag a piece up or down and the others make way; let go and the new order is saved. On Solid 2 the list is shared, and other people's moves glide in live. (on Foldkit)
  • Arrange a room, at any zoom: Zoom the floor plan in or out, then drag the sofa, the table and the lamp about: each stays under your pointer, and inside the room. (on Foldkit)
  • Tiles that lift, whatever they are: A link, a button and a photo: each rises under the pointer and casts a shadow, the button gives as it's pressed, the photo leans. None has a wrapper around it.
  • Glaze test tiles that turn over: Tap a glaze's test tile and it turns over to show its recipe, each tile in a depth of its own, wherever it sits on the wall.
  • The collection on a dial that turns: All twelve pieces ride a wheel turning under the page: drag it and throw it, and it settles on a piece, its name and number rolling over like a counter, its price counting to the next. Press the piece at the front and its photo is tossed into its details along an arc, and from there into the cart.

Presence

Things that leave as nicely as they arrive.

Sequences

Steps that play one after another from code, with the shop's own work between them.

  • Checkout, step by step: Place the order: the cart's lines leave, the store takes the order, then its parcel arrives. Set the store to fail the next request, and the lines come back.

Page transitions

Moving from page to page: the one you leave goes, the next arrives, and what they share flies between them.

  • From the catalogue to a piece's own page: Open a piece and its photo flies from the catalogue into its own page; go back and it flies home. The two are routes, so the browser's back and forward do the same. (on Foldkit)
  • Waiting for a piece's details: A piece's page whose details come from the store, on Solid 2: show a skeleton and the photo flies at once, or keep the catalogue until the details land, then fly.

Live values

Values that follow the pointer, the scroll or each other.

3D scenes

The shop's pieces as three.js scenes: Wardic's hooks on meshes instead of elements.

  • Turn the vase in 3D: The Moon Vase as a three.js scene: drag it round and it spins on with your hand's momentum, and each glaze you pick flows over it.
  • Kintsugi: 3,000 shards, one Batch: Tap the crackled celadon bowl and it bursts into shards from where you touched it; mend it and they fly home in a wave, its cracks turned gold.
  • The studio's pieces on a round shelf: All twelve pieces turned in 3D on a round display: pick a category and the rest sink away while the others slide round; tap one and the display turns it to you.
  • Fire the kiln: a sequence as an action: Three pieces in raw glaze on a kiln's shelf: fire it and the lid shuts, everything glows from dull red to white-hot, then cools to show each glaze.

Server rendering

Animations that play before the JavaScript has loaded.

With a component library

Dialogs, selects and tabs from a component library: its keyboard and accessibility, animated.

Shipping less

Load only the animation code a page uses, and the rest when it's wanted.