Drill-down — breadcrumb fold
Variant: Breadcrumb fold
Three levels down and one tap back up, where every level’s name is a single element with three homes: its row, the title, and the trail. The row you tap is the title you get — the label lifts out as its list leaves to the left — while the old title shrinks into the crumb row on the same 320ms ease-in-out, because both are already on screen. On the second step the vendor’s x rides the separate translate property on an ease-out while its height lags on the in-out, so it swings right before it rises and never crosses the crumb already there. Tap the first crumb and the stack unwinds two levels in one 288ms travel instead of replaying both steps: the level being left clears in 120ms first, the vendor drops home with its height leading, and the rest of the list waits for it to land. Use it on any hierarchy deeper than two, where people need to see how they got here and leave by a shortcut.
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 — breadcrumb fold</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 — 8s, so 1% is 80ms. Each step down travels for 320ms; the
jump back up two levels travels once, for 288ms. */
--cycle: 8s;
--t: calc(var(--cycle) / var(--speed));
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
/* A label has three homes, and these are the transforms between them.
Title: 15px at the origin. Crumb: 11px, 20px up. Row: 12px, sitting
on its row in the list below — so the row you tap is the title you
get, not a second copy of its name. */
--_crumb: scale(0.7333);
--_row: scale(0.8);
--_crumb-2: 72px;
--_dx: 12px;
--_stagger: calc(40ms / var(--speed));
}
* {
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;
inset: 0;
z-index: 2;
pointer-events: none;
}
/* Every label is one element that moves between homes, so a level's
name never exists twice on screen and never has to be recognised
twice. Transforms only: the type is set once at 15px and scaled. */
.label {
position: absolute;
left: 12px;
top: 30px;
height: 20px;
font-size: 15px;
line-height: 20px;
font-weight: 600;
letter-spacing: -0.01em;
white-space: nowrap;
transform-origin: 0 0;
animation-duration: var(--t);
animation-iteration-count: infinite;
animation-timing-function: var(--ease-in-out);
}
.l0 {
animation-name: l0;
}
.l1 {
transform: translateY(69px) var(--_row);
translate: 10px 0;
animation-name: l1, l1-x;
}
.l2 {
opacity: 0;
transform: translate(10px, 37px) var(--_row);
animation-name: l2;
}
.sep {
position: absolute;
left: 69px;
top: 9px;
font-size: 11px;
line-height: 15px;
color: color-mix(in srgb, var(--slate) 35%, transparent);
opacity: 0;
animation: sep var(--t) var(--ease-out) infinite;
}
.hit {
position: absolute;
left: 5px;
top: 6px;
width: 62px;
height: 21px;
border-radius: 999px;
background: color-mix(in srgb, var(--slate) 9%, transparent);
opacity: 0;
animation: hit var(--t) var(--ease-out) infinite;
}
.list {
position: absolute;
left: 12px;
right: 12px;
top: 62px;
display: grid;
gap: 6px;
}
.row {
display: flex;
align-items: center;
gap: 8px;
height: 26px;
padding: 0 9px;
border-radius: calc(6px * var(--round));
background: var(--paper);
border: 1px solid color-mix(in srgb, var(--slate) 8%, transparent);
font-size: 12px;
font-weight: 600;
letter-spacing: -0.01em;
font-variant-numeric: tabular-nums;
opacity: 0;
animation-duration: var(--t);
animation-iteration-count: infinite;
animation-timing-function: var(--ease-out);
animation-delay: calc(var(--_i, 0) * var(--_stagger));
}
.row .when {
font-size: 11px;
font-weight: 400;
color: color-mix(in srgb, var(--slate) 50%, transparent);
}
.row .amt {
margin-left: auto;
font-size: 11px;
font-weight: 500;
}
/* A row whose name is a travelling label keeps the room for it. */
.row .slot {
width: 64px;
flex: none;
}
.list > div:nth-of-type(2) {
--_i: 1;
}
.list > div:nth-of-type(3) {
--_i: 2;
}
/* A list's exit belongs to the list and its entrance to the rows: the
rows stagger in, but they leave as one, on the container. */
.list {
animation-duration: var(--t);
animation-iteration-count: infinite;
animation-timing-function: var(--ease-out);
}
.v0 {
animation-name: exit-0;
}
.v1 {
animation-name: exit-1;
}
.v2 {
animation-name: exit-2;
}
.v0 .row {
opacity: 1;
animation-name: list-0;
}
/* On the way back the vendor's own row arrives with it; the rest of the
list waits for it to land, so its path down never crosses a row that
is already drawn. */
.v0 > div:nth-of-type(2) {
animation-name: list-0-home;
}
.v1 .row {
animation-name: list-1;
}
.v2 .row,
.v2 .note {
animation-name: list-2;
}
.v2 .row.dup {
border-color: color-mix(in srgb, var(--rust) 34%, transparent);
}
.v2 .row.dup .amt {
color: var(--rust);
}
.note {
padding: 2px 2px 0;
font-size: 11px;
color: color-mix(in srgb, var(--slate) 52%, transparent);
opacity: 0;
animation-duration: var(--t);
animation-iteration-count: infinite;
animation-timing-function: var(--ease-out);
animation-delay: calc(var(--_i, 0) * var(--_stagger));
}
/* The press is a tint laid over the row rather than its background, so
it can be timed apart from the row's own exit. */
.press {
position: absolute;
z-index: 1;
left: 0;
right: 0;
height: 26px;
border-radius: calc(6px * var(--round));
background: color-mix(in srgb, var(--clay) 12%, transparent);
opacity: 0;
animation-duration: var(--t);
animation-iteration-count: infinite;
animation-timing-function: var(--ease-out);
}
.press.p0 {
top: 32px;
animation-name: press-0;
}
.press.p1 {
top: 0;
animation-name: press-1;
}
/* 10–14%: down to the vendor. 28–32%: down to the invoice. 54–57.6%:
the first crumb is tapped and the stack unwinds two levels in one
travel — replaying both steps would make the shortcut cost what the
long way did. */
@keyframes l0 {
0%,
10% {
transform: translate(0, 0) scale(1);
color: var(--slate);
}
14%,
54% {
transform: translate(0, -20px) var(--_crumb);
color: color-mix(in srgb, var(--slate) 55%, transparent);
}
57.6%,
100% {
transform: translate(0, 0) scale(1);
color: var(--slate);
}
}
/* The vendor travels on two curves at once: its height on transform and
its x on the separate translate property. Going down into the trail,
x leads and height lags, so it swings right before it rises and never
passes over the crumb already there. Going home, height leads — it
drops clear of the title band first, then slides into its row, the
place the eye will look for it next. */
@keyframes l1 {
0%,
10% {
transform: translateY(69px) var(--_row);
color: var(--slate);
}
14%,
28% {
transform: translateY(0) scale(1);
color: var(--slate);
}
32%,
54% {
transform: translateY(-20px) var(--_crumb);
color: color-mix(in srgb, var(--slate) 55%, transparent);
animation-timing-function: var(--ease-out);
}
57.6%,
100% {
transform: translateY(69px) var(--_row);
color: var(--slate);
}
}
@keyframes l1-x {
0%,
10% {
translate: 10px 0;
}
14%,
28% {
translate: 0 0;
animation-timing-function: var(--ease-out);
}
32%,
54% {
translate: var(--_crumb-2) 0;
}
57.6%,
100% {
translate: 10px 0;
}
}
/* Reduced motion has no path to shape, so it keeps one keyframe set. */
@keyframes l1-jump {
0%,
10% {
transform: translate(10px, 69px) var(--_row);
}
14%,
28% {
transform: translate(0, 0) scale(1);
}
32%,
54% {
transform: translate(var(--_crumb-2), -20px) var(--_crumb);
color: color-mix(in srgb, var(--slate) 55%, transparent);
}
57.6%,
100% {
transform: translate(10px, 69px) var(--_row);
}
}
/* The invoice's row is not on screen at the top level, so it has no
home to return to. It clears on the tap, before anything travels, so
the vendor dropping home never crosses a title that is still there. */
@keyframes l2 {
0%,
14% {
opacity: 0;
transform: translate(10px, 37px) var(--_row);
}
17.5%,
28% {
opacity: 1;
transform: translate(10px, 37px) var(--_row);
}
32%,
52.5% {
opacity: 1;
transform: translate(0, 0) scale(1);
}
54% {
opacity: 0;
transform: translate(0, 0) scale(1);
}
54.1%,
100% {
opacity: 0;
transform: translate(10px, 37px) var(--_row);
}
}
@keyframes sep {
0%,
31% {
opacity: 0;
}
33.5%,
54% {
opacity: 1;
}
55.5%,
100% {
opacity: 0;
}
}
@keyframes hit {
0%,
51% {
opacity: 0;
}
52.5% {
opacity: 1;
}
55.5%,
100% {
opacity: 0;
}
}
@keyframes press-0 {
0%,
8% {
opacity: 0;
}
9.5% {
opacity: 1;
}
12%,
100% {
opacity: 0;
}
}
@keyframes press-1 {
0%,
26% {
opacity: 0;
}
27.5% {
opacity: 1;
}
30%,
100% {
opacity: 0;
}
}
/* Forward is leftward and back is rightward, so a list always enters
from the side the user is coming from. The level being left clears
in 120ms from the tap, before anything travels: backing out is a
dismissal, and nothing should fly across content still on its way
out. Each container comes back only after its rows have reset. */
@keyframes exit-0 {
0%,
10% {
opacity: 1;
transform: translateX(0);
}
12.5%,
14% {
opacity: 0;
transform: translateX(calc(-1 * var(--_dx)));
}
14.1%,
100% {
opacity: 1;
transform: translateX(0);
}
}
@keyframes exit-1 {
0%,
28% {
opacity: 1;
transform: translateX(0);
}
30.5%,
32% {
opacity: 0;
transform: translateX(calc(-1 * var(--_dx)));
}
32.1%,
100% {
opacity: 1;
transform: translateX(0);
}
}
@keyframes exit-2 {
0%,
52.5% {
opacity: 1;
transform: translateX(0);
}
54%,
56% {
opacity: 0;
transform: translateX(var(--_dx));
}
56.1%,
100% {
opacity: 1;
transform: translateX(0);
}
}
@keyframes list-0 {
0%,
12.5% {
opacity: 1;
transform: translateX(0);
}
12.6%,
57.6% {
opacity: 0;
transform: translateX(calc(-1 * var(--_dx)));
}
61%,
100% {
opacity: 1;
transform: translateX(0);
}
}
/* The home row is drawn in the last 88ms of the vendor's descent, once
the label is below the row's top edge — a border sliding in under a
label still crossing it reads as a collision. */
@keyframes list-0-home {
0%,
12.5% {
opacity: 1;
transform: translateX(0);
}
12.6%,
56.5% {
opacity: 0;
transform: translateX(0);
}
57.6%,
100% {
opacity: 1;
transform: translateX(0);
}
}
@keyframes list-1 {
0%,
14% {
opacity: 0;
transform: translateX(var(--_dx));
}
17.5%,
30.5% {
opacity: 1;
transform: translateX(0);
}
30.6%,
100% {
opacity: 0;
transform: translateX(var(--_dx));
}
}
@keyframes list-2 {
0%,
32% {
opacity: 0;
transform: translateX(var(--_dx));
}
35.5%,
54% {
opacity: 1;
transform: translateX(0);
}
54.1%,
100% {
opacity: 0;
transform: translateX(var(--_dx));
}
}
@media (prefers-reduced-motion: reduce) {
/* Nothing travels. Labels jump to their next home on steps(1) while
the header is faded out, lists crossfade in place, and the cycle
runs at 1.5x. The trail still builds and unwinds — that is the
state, and it survives without the motion. */
:root {
--_dx: 0px;
--_stagger: 0s;
}
.label {
animation-timing-function: steps(1, start);
}
.l1 {
translate: none;
animation-name: l1-jump;
}
/* The vendor is home on the frame the stack unwinds, so its row has to
be there to receive it rather than arriving a beat later. */
.v0 > div:nth-of-type(2) {
animation-name: home-still;
}
@keyframes home-still {
0%,
12.5% {
opacity: 1;
}
12.6%,
54% {
opacity: 0;
}
56%,
100% {
opacity: 1;
}
}
.head {
animation: head-dip calc(var(--t) * 1.5) var(--ease-out) infinite;
}
.label,
.sep,
.hit,
.list,
.row,
.note,
.press {
animation-duration: calc(var(--t) * 1.5);
}
/* steps(1, start) puts each label in its next home on the first frame
of its window, so the header only has to dip around that frame. */
@keyframes head-dip {
0%,
8.5%,
26.5%,
51% {
opacity: 1;
}
10%,
28%,
52.5%,
54% {
opacity: 0;
}
12.5%,
30.5%,
56.5%,
100% {
opacity: 1;
}
}
}
</style>
</head>
<body>
<div
class="frame"
role="img"
aria-label="Drilling down from Q3 spend to a vendor to an invoice. Each time, the tapped row's name rises to become the title and the old title folds up into a breadcrumb. Tapping the first crumb unwinds both levels in one move, and the vendor's name returns to its row."
>
<div class="head">
<span class="hit"></span>
<span class="sep">›</span>
<span class="label l0">Q3 spend</span>
<span class="label l1">Halden Supply</span>
<span class="label l2">INV-4471</span>
</div>
<div class="list v0">
<span class="press p0"></span>
<div class="row">Petrel Freight<span class="amt">$15,230</span></div>
<div class="row"><span class="slot"></span><span class="amt">$12,400</span></div>
<div class="row">Marrow & Co<span class="amt">$9,860</span></div>
</div>
<div class="list v1">
<span class="press p1"></span>
<div class="row">
<span class="slot"></span><span class="when">Mar 02</span><span class="amt">$5,960</span>
</div>
<div class="row">
<span class="slot">INV-4502</span><span class="when">Mar 09</span
><span class="amt">$6,440</span>
</div>
</div>
<div class="list v2">
<div class="row dup">
Paid<span class="when">Mar 02 · 09:14</span><span class="amt">$2,980</span>
</div>
<div class="row dup">
Paid<span class="when">Mar 02 · 09:18</span><span class="amt">$2,980</span>
</div>
<div class="note">One invoice, settled twice</div>
</div>
</div>
</body>
</html>
The variant family
Same idea, one axis moved. Compare them side by side before you commit.