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.
- The product grid: The shop's grid fades and rises in, one card after another. (on Foldkit)
- Stock that fills in as it arrives: Each piece's stock meter fills in once the store's count arrives, and says when it has settled. Switch to after the delivery and they fill up from where they are. (on Foldkit)
Layout
Elements that move and resize as the page changes around them.
- A product opens into its detail view: Tap a piece and its card grows into the full view, photo, name and price carried across. (on Foldkit)
- Filter the shop, switch the view: Pick a category and the products that stay slide together; switch to a list and every card reshapes into a row. (on Foldkit)
- Tabs on a product page: Switch between a piece's description, details and delivery, and the underline slides to the tab you chose. (on Foldkit)
- Add to cart, and see it's done: The button says what it's doing, adding then added, and makes room for a way to the cart. (on Foldkit)
- Questions that open in place: Open an answer, and its card grows to fit while the questions below slide down to make room. Open all, or close all, and they change at once. (on Foldkit)
- A cart drawer that keeps up: Change a quantity or remove a piece, and the lines below close up at once, before the store has answered. (on Foldkit)
- Order history in a scrolling panel: Sort your orders and each one glides to its new place; open one and only the orders below it make room. (on Foldkit)
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 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)
- 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.
Presence
Things that leave as nicely as they arrive.
- "Added to cart", in toasts that make room: Each piece you add says so in a toast; when one goes, the others close the gap. (on Foldkit)
- A photo gallery that slides the way you go: Swipe or step through the collection's photos: each comes in from the side you're heading to, and the last one leaves by the other. (on Foldkit)
- A quick view whose list leaves before it: Open a piece in a quick view and dismiss the suggestions you don't want. Close it, and what's left of the list goes first. (on Foldkit)
- Saved for later, moved to the cart: Move a saved piece to your cart and its photo flies into the cart; remove one and it fades. The rest close up behind it. (on Foldkit)
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.
- A closer look at the glaze: Hover over the vase and a lens follows your pointer, gliding after it and settling where you stop. (on Foldkit)
- Before and after the kiln: Drag the handle across a piece to see it before its glaze and after the kiln; the arrow keys move it too.
- An announcement bar that leans with your scroll: The studio's news runs across the page; scroll, and the bar leans into it and runs faster, backwards as you scroll up.
- A reading bar for the studio's story: Scroll through how the Lagoon glaze is made, and a bar along the top fills as you read, the minutes left beside it. (on Foldkit)
- A lookbook with depth: Scroll the lookbook and each collection's photo drifts slower than its banner and its words faster, as if they sat at different depths. (on Foldkit)
- The studio's story, revealed as you read: Each chapter of the studio's story rises into place as it scrolls into view, its photo first and its words after. (on Foldkit)
- Cards that catch the light: Move over a piece and its card tilts toward your pointer, with a soft light under it that follows. (on Foldkit)
- Announcements that take turns: The strip above the shop shows one message at a time, a bar filling under it, and holds while you read it or look away. (on Foldkit)
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.
- A banner that arrives before the JavaScript: The season's banner plays its entrance from the first paint, whether the JavaScript is late or never comes. (on Foldkit)
- Every piece on one wall, before the JavaScript: The archive's 600 pieces rise onto one wall from the first paint, in a wave, before the page's JavaScript has loaded; it takes over mid-wave.
With a component library
Dialogs, selects and tabs from a component library: its keyboard and accessibility, animated.
- A size guide in Kobalte's dialog: Open the size guide: the shop dims and the guide rises in. Escape, a click outside or ✕ takes it away as smoothly. (on Foldkit)
- Sort the shop with Kobalte's select: Pick an order: the list grows out of its button, and the pieces slide to their new places. (on Foldkit)
- A piece's details in Kobalte's tabs: Switch between a piece's size, material and care: the underline slides to the tab, whether you click or use the arrow keys. (on Foldkit)
Shipping less
Load only the animation code a page uses, and the rest when it's wanted.
- Rearrange the room: drag loads when you ask: The room's pieces stay put until you press Rearrange. Only then does the page fetch Wardic's drag, and the card says how long it took to arrive. (on Foldkit)