Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

Ink cover

A page transition where a blot of ink spreads from the clicked link over the page, then recedes or opens a hole to show the new page.

View as Markdown
On this page

A blot of ink spreads from the link the visitor clicked, its edge uneven and drops running ahead of it, until it covers the page. After the router has swapped the page, the ink draws back into where it came from. It suits portfolios, editorial sites, galleries and food brands.

Ink spreading from the Studio link in the header over the page of a studio site, a drop ahead of its edge

import { start } from '@dioramajs/diorama'
export const app = start({ transitions: { cover: 'ink' } })

The page covers guide explains how the cover works with your router, the timing options and what visitors with reduced motion see.

Recipes

Receding ink

By default the ink recedes into the point it came from, and the new page shows from the far corners in.

Ink drawing back toward the header link and showing the new page around it

A hole in the ink

motion: 'hole' keeps the ink on the page and opens a hole where it started. The new page grows out of the click.

start({
transitions: {
cover: { name: 'ink', motion: 'hole', color: '#c1121f' },
},
})

A hole with an uneven edge opening in red ink and showing a studio page

A calm edge

wobble sets how uneven the edge is. At 0 the ink is a clean circle without drops.

start({
transitions: {
cover: { name: 'ink', wobble: 0.1, color: '#264653' },
},
})

Options

OptionDefaultWhat it does
motion'recede'How the new page shows: the ink 'recede's, or a 'hole' opens
color'#0e0e10'Any CSS color
wobble0.50 to 1, how uneven the edge is, with drops ahead of it
shade0.30 to 1, a darker rim along the edge
seed1Another number gives another edge and other drops

duration, ease, wait, timeout, links and arrive are shared by every cover and described in the guide.

Notes

A keyboard click starts the ink at the middle of the focused link. Back, Forward and a router call in your code have no click, so the ink starts in the middle of the screen.