Drill-down — zoom through
Variant: Zoom through
A semantic zoom: the overview is a plane, and going into a figure means the camera moving into its tile until the tile is the frame. One uniform scale off the tile’s far corner does it — every tile is 47.5% of the plane on both axes, so it shares the plane’s aspect ratio and lands edge to edge with nothing stretched. Unlike a shared-element expand, the neighbours are part of the move: never dismissed, they leave past the edges they sat against, so after 320ms on a decelerating curve you still know where the rest of the quarter went. The tile’s own type fades in the first 96ms, before the scale can make it the loudest thing on screen, and the payments are drawn at their own size on the surface the tile became, 45ms apart, starting as the camera settles so the tile is never an empty box. Out is 256ms, and the flag that was the reason to go in comes back as "Reviewed" — an overview that remembers the visit. Reach for it on dashboards whose tiles summarise something you can open: spend by vendor, errors by service, sales by region.
The source
A complete HTML document. Paste it into an empty .html file and it plays — no stylesheet, script, font, or image to fetch.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Drill-down — zoom through</title>
<style>
:root {
/* Neutrals — fixed, never remixed. */
--ivory: #faf9f5;
--paper: #ffffff;
--oat: #e3dacc;
--slate: #141413;
/* Knobs — the remix API. A knob exists iff declared here and used below. */
--hue: 38.8;
--lift: 0;
--chroma: 1;
--round: 1;
--speed: 1;
/* Accents — derived from the knobs with the family's offsets baked in,
so one hue roll moves them together. Defaults reproduce the original hex. */
--clay: oklch(calc(0.6724 + var(--lift)) calc(0.1308 * var(--chroma)) var(--hue));
--clay-d: oklch(calc(0.5797 + var(--lift)) calc(0.127 * var(--chroma)) var(--hue));
--olive: oklch(
calc(0.6118 + var(--lift)) calc(0.0713 * var(--chroma)) calc(var(--hue) + 88.3)
);
--rust: oklch(
calc(0.5408 + var(--lift)) calc(0.1357 * var(--chroma)) calc(var(--hue) - 10.3)
);
/* Clock — 6.4s, so 1% is 64ms. In: 320ms. Out: 256ms. */
--cycle: 6.4s;
--t: calc(var(--cycle) / var(--speed));
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
--ease-accent: cubic-bezier(0.32, 0.72, 0, 1);
/* A tile is 47.5% of the plane on both axes, so it has the plane's
aspect ratio and one uniform scale makes it the plane exactly. */
--_tile: 47.5%;
--_far: calc(100% - var(--_tile));
--_zoom: 2.10526;
--_r: calc(7px * var(--round));
--_rise: 4px;
--_pop: 0.94;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
min-height: 100vh;
display: grid;
place-items: center;
background: var(--ivory);
font-family:
system-ui,
-apple-system,
'Segoe UI',
Roboto,
sans-serif;
color: var(--slate);
}
.frame {
position: relative;
width: min(300px, calc(100vw - 32px));
height: 182px;
border-radius: calc(12px * var(--round));
background: var(--paper);
border: 1px solid color-mix(in srgb, var(--slate) 9%, transparent);
overflow: hidden;
}
.head {
position: absolute;
left: 12px;
right: 12px;
top: 0;
height: 34px;
font-size: 12px;
font-weight: 600;
letter-spacing: -0.005em;
}
.head span {
position: absolute;
inset: 0;
display: flex;
align-items: center;
gap: 6px;
white-space: nowrap;
}
.head b {
font-weight: 500;
font-variant-numeric: tabular-nums;
color: color-mix(in srgb, var(--slate) 50%, transparent);
}
.head .a {
animation: title-a var(--t) infinite;
}
.head .b {
opacity: 0;
animation: title-b var(--t) infinite;
}
.back {
display: inline-grid;
place-items: center;
width: 18px;
height: 18px;
margin-left: -4px;
position: relative;
border-radius: 50%;
color: color-mix(in srgb, var(--slate) 55%, transparent);
}
.back::before {
content: '';
position: absolute;
inset: 0;
border-radius: 50%;
background: color-mix(in srgb, var(--slate) 10%, transparent);
opacity: 0;
animation: back-press var(--t) var(--ease-out) infinite;
}
.back svg {
width: 10px;
height: 10px;
display: block;
}
/* The viewport is the camera's frame; the plane is the world it moves
through. Neighbours leave by the edge they sat against, so after the
zoom they are still out there, in the direction they always were. */
.viewport {
position: absolute;
left: 8px;
right: 8px;
top: 34px;
bottom: 8px;
border-radius: var(--_r);
overflow: hidden;
}
.plane {
position: absolute;
inset: 0;
transform-origin: 100% 100%;
animation: zoom var(--t) infinite;
}
.tile {
position: absolute;
width: var(--_tile);
height: var(--_tile);
padding: 9px 10px;
display: flex;
flex-direction: column;
gap: 3px;
border-radius: var(--_r);
background: color-mix(in srgb, var(--oat) 26%, var(--paper));
border: 1px solid color-mix(in srgb, var(--slate) 7%, transparent);
font-size: 11px;
}
.t2,
.t4 {
left: var(--_far);
}
.t3,
.t4 {
top: var(--_far);
}
.tile .amt {
font-size: 13px;
font-weight: 600;
font-variant-numeric: tabular-nums;
letter-spacing: -0.01em;
}
.tile .name {
color: color-mix(in srgb, var(--slate) 62%, transparent);
white-space: nowrap;
}
.share {
margin-top: auto;
height: 4px;
border-radius: 2px;
background: color-mix(in srgb, var(--slate) 8%, transparent);
overflow: hidden;
}
.share i {
display: block;
height: 100%;
width: var(--_w);
border-radius: 2px;
background: color-mix(in srgb, var(--slate) 22%, transparent);
}
.t4 {
background: color-mix(in srgb, var(--clay) 8%, var(--paper));
border-color: color-mix(in srgb, var(--clay) 26%, transparent);
animation: press var(--t) infinite;
}
.t4 .share {
margin-right: 68px;
}
.t4 .share i {
background: var(--clay);
}
/* Scaled 2.1x, the tile's own type would be the loudest thing on screen
for the whole zoom. It leaves in the first 96ms, before the scale has
had time to show. */
.t4 .name,
.t4 .amt,
.t4 .share {
animation: face var(--t) infinite;
}
/* On the bar's line, which gives up its right end for it: the name and
the amount both need the tile's full width at a 311px stage. */
.mark {
position: absolute;
bottom: 3px;
right: 9px;
height: 16px;
font-size: 11px;
line-height: 16px;
font-weight: 500;
}
.mark span {
position: absolute;
right: 0;
top: 0;
padding: 0 6px;
border-radius: 999px;
white-space: nowrap;
}
.mark .flag {
color: var(--rust);
background: color-mix(in srgb, var(--rust) 11%, transparent);
animation: flag var(--t) infinite;
}
.mark .seen {
color: var(--olive);
background: color-mix(in srgb, var(--olive) 14%, transparent);
opacity: 0;
animation: seen var(--t) infinite;
}
/* The detail is not scaled: it is the next level, drawn at its own size
on the surface the tile became. */
.detail {
position: absolute;
left: 8px;
right: 8px;
top: 34px;
bottom: 8px;
padding: 10px;
display: grid;
align-content: start;
gap: 6px;
pointer-events: none;
}
.row {
display: flex;
align-items: center;
gap: 8px;
height: 26px;
padding: 0 9px;
border-radius: calc(5px * var(--round));
background: var(--paper);
border: 1px solid color-mix(in srgb, var(--slate) 8%, transparent);
font-size: 11px;
font-variant-numeric: tabular-nums;
opacity: 0;
animation: row-in var(--t) infinite;
}
.row .when {
color: color-mix(in srgb, var(--slate) 50%, transparent);
}
.row .amt {
margin-left: auto;
font-weight: 600;
}
.row.dup {
border-color: color-mix(in srgb, var(--rust) 34%, transparent);
}
.row.dup .amt {
color: var(--rust);
}
.row:nth-child(2) {
animation-name: row-in-2;
}
.row:nth-child(3) {
animation-name: row-in-3;
}
.note {
padding: 2px 2px 0;
font-size: 11px;
color: color-mix(in srgb, var(--slate) 52%, transparent);
opacity: 0;
animation: row-in-3 var(--t) infinite;
}
/* 9.4–11%: the press. 11.5–16.5%: in, 320ms on the accent curve — the
camera answers a tap, so it decelerates into the tile. 54.5–58.5%:
out, 256ms. Going back up is the cheaper decision. */
@keyframes zoom {
0%,
11.5% {
transform: scale(1);
animation-timing-function: var(--ease-accent);
}
16.5%,
54.5% {
transform: scale(var(--_zoom));
animation-timing-function: var(--ease-accent);
}
58.5%,
100% {
transform: scale(1);
}
}
@keyframes press {
0%,
9.4% {
transform: scale(1);
animation-timing-function: var(--ease-out);
}
11% {
transform: scale(0.97);
animation-timing-function: var(--ease-out);
}
12.5%,
100% {
transform: scale(1);
}
}
@keyframes face {
0%,
11.5% {
opacity: 1;
animation-timing-function: var(--ease-out);
}
13%,
57.5% {
opacity: 0;
animation-timing-function: var(--ease-out);
}
60.5%,
100% {
opacity: 1;
}
}
/* The flag that was the reason to go in is answered on the way out: it
comes back as "reviewed", so the overview remembers the visit. At the
loop seam the two never share a frame — a ghosted pair reads as the
review being undone. */
@keyframes flag {
0%,
11.5% {
opacity: 1;
animation-timing-function: var(--ease-out);
}
13%,
96% {
opacity: 0;
animation-timing-function: var(--ease-out);
}
99%,
100% {
opacity: 1;
}
}
@keyframes seen {
0%,
59% {
opacity: 0;
transform: scale(var(--_pop));
animation-timing-function: var(--ease-out);
}
63%,
93.5% {
opacity: 1;
transform: scale(1);
animation-timing-function: var(--ease-out);
}
95.5%,
100% {
opacity: 0;
transform: scale(1);
}
}
@keyframes title-a {
0%,
11.5% {
opacity: 1;
transform: translateY(0);
animation-timing-function: var(--ease-out);
}
13.5%,
55.5% {
opacity: 0;
transform: translateY(calc(-1 * var(--_rise)));
}
55.6% {
transform: translateY(var(--_rise));
animation-timing-function: var(--ease-out);
}
59.5%,
100% {
opacity: 1;
transform: translateY(0);
}
}
@keyframes title-b {
0%,
14% {
opacity: 0;
transform: translateY(var(--_rise));
animation-timing-function: var(--ease-out);
}
18.5%,
52.5% {
opacity: 1;
transform: translateY(0);
animation-timing-function: var(--ease-out);
}
54.5%,
100% {
opacity: 0;
transform: translateY(var(--_rise));
}
}
@keyframes back-press {
0%,
51% {
opacity: 0;
}
52.5% {
opacity: 1;
}
55%,
100% {
opacity: 0;
}
}
/* The rows start as the camera settles — 64ms before it stops, so the
tile is never an empty surface — and stagger 45ms apart. They
leave together — an exit has nothing to read in order. */
@keyframes row-in {
0%,
15.5% {
opacity: 0;
transform: translateY(var(--_rise));
animation-timing-function: var(--ease-out);
}
18.5%,
52.5% {
opacity: 1;
transform: translateY(0);
animation-timing-function: var(--ease-out);
}
54%,
100% {
opacity: 0;
transform: translateY(0);
}
}
@keyframes row-in-2 {
0%,
16.2% {
opacity: 0;
transform: translateY(var(--_rise));
animation-timing-function: var(--ease-out);
}
19.2%,
52.5% {
opacity: 1;
transform: translateY(0);
animation-timing-function: var(--ease-out);
}
54%,
100% {
opacity: 0;
transform: translateY(0);
}
}
@keyframes row-in-3 {
0%,
16.9% {
opacity: 0;
transform: translateY(var(--_rise));
animation-timing-function: var(--ease-out);
}
19.9%,
52.5% {
opacity: 1;
transform: translateY(0);
animation-timing-function: var(--ease-out);
}
54%,
100% {
opacity: 0;
transform: translateY(0);
}
}
@media (prefers-reduced-motion: reduce) {
/* No camera. The overview and the detail crossfade in place, slowed
to 1.5x; the flag still turns into "reviewed" on the way back,
because that is information, not motion. */
.plane {
animation-name: plane-fade;
}
.row,
.note {
animation-name: detail-fade;
}
:root {
--_rise: 0px;
--_pop: 1;
}
.t4 {
animation: none;
}
.plane,
.row,
.note,
.head .a,
.head .b,
.back::before,
.flag,
.seen,
.t4 .name,
.t4 .amt,
.t4 .share {
animation-duration: calc(var(--t) * 1.5);
}
@keyframes plane-fade {
0%,
11.5% {
opacity: 1;
animation-timing-function: var(--ease-out);
}
15%,
54.5% {
opacity: 0;
animation-timing-function: var(--ease-out);
}
58.5%,
100% {
opacity: 1;
}
}
@keyframes detail-fade {
0%,
15% {
opacity: 0;
animation-timing-function: var(--ease-out);
}
19%,
52.5% {
opacity: 1;
animation-timing-function: var(--ease-out);
}
54.5%,
100% {
opacity: 0;
}
}
}
</style>
</head>
<body>
<div
class="frame"
role="img"
aria-label="A grid of four vendor totals. The flagged vendor is tapped and the view zooms into its tile until it fills the frame, its neighbours leaving past the edges; its three payments appear, two of them duplicates. Going back zooms out, and the tile's flag now reads reviewed."
>
<div class="head">
<span class="a">Q3 spend <b>$48,210</b></span>
<span class="b">
<i class="back">
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
<path
d="m15 5-7 7 7 7"
stroke="currentColor"
stroke-width="2.6"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
</i>
Halden Supply <b>$12,400</b>
</span>
</div>
<div class="viewport">
<div class="plane">
<div class="tile t1">
<span class="name">Petrel Freight</span>
<span class="amt">$15,230</span>
<span class="share"><i style="--_w: 32%"></i></span>
</div>
<div class="tile t2">
<span class="name">Odd Lot Print</span>
<span class="amt">$10,720</span>
<span class="share"><i style="--_w: 22%"></i></span>
</div>
<div class="tile t3">
<span class="name">Marrow & Co</span>
<span class="amt">$9,860</span>
<span class="share"><i style="--_w: 20%"></i></span>
</div>
<div class="tile t4">
<span class="name">Halden Supply</span>
<span class="amt">$12,400</span>
<span class="share"><i style="--_w: 26%"></i></span>
<span class="mark">
<span class="flag">2 dupes</span>
<span class="seen">Reviewed</span>
</span>
</div>
</div>
</div>
<div class="detail">
<div class="row dup">
<span>INV-4471</span><span class="when">Mar 02</span><span class="amt">$2,980</span>
</div>
<div class="row dup">
<span>INV-4471</span><span class="when">Mar 02</span><span class="amt">$2,980</span>
</div>
<div class="row">
<span>INV-4502</span><span class="when">Mar 09</span><span class="amt">$6,440</span>
</div>
<div class="note">Same invoice paid twice, 4 minutes apart</div>
</div>
</div>
</body>
</html>
The variant family
Same idea, one axis moved. Compare them side by side before you commit.