Print burst intro
One print appears in the centre, then the others glide out from it to a scattered layout while the name comes into focus.
Part of the style
Drifting Print Field
6 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/drifting-print-field/intro/figma.html
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/drifting-print-field/intro/figma.html and pass that whole HTML document to the html_to_figma tool, so the part "Print burst intro" lands as editable layers in my open Figma file. Fonts come from Google Fonts: if a face is missing in Figma, pick the closest one.
Code
<section class="intro" aria-label="Opening">
<div class="intro__stage">
<h1 class="intro__name">Ilse Marwood</h1>
<img class="intro__print intro__print--wide" style="--x: 50%; --y: 6%;" src="assets/wave-large.jpg" alt="A blue wave curling over" width="960" height="640">
<img class="intro__print intro__print--wide intro__print--mono" style="--x: 26%; --y: 22%;" src="assets/barks.jpg" alt="Sailing boats under a storm sky" width="800" height="518">
<img class="intro__print intro__print--tall" style="--x: 72%; --y: 22%;" src="assets/sitter.jpg" alt="An old portrait of a woman with long hair" width="634" height="800">
<img class="intro__print intro__print--tall" style="--x: 3%; --y: 46%;" src="assets/dunes-tall.jpg" alt="A dirt road toward pale hills" width="534" height="800">
<img class="intro__print intro__print--tall intro__print--mono" style="--x: 97%; --y: 40%;" src="assets/window.jpg" alt="A figure at a bright window" width="541" height="800">
<img class="intro__print intro__print--wide" style="--x: 29%; --y: 80%;" src="assets/crater.jpg" alt="Purple desert flowers on dark rock" width="800" height="534">
<img class="intro__print intro__print--wide intro__print--mono" style="--x: 71%; --y: 80%;" src="assets/wave-fjord.jpg" alt="Waves breaking on dark stones" width="800" height="450">
<img class="intro__print intro__print--wide" style="--x: 99%; --y: 92%;" src="assets/bathers.jpg" alt="Bathers on a grey beach" width="800" height="479">
<img class="intro__print intro__print--wide" style="--x: 2%; --y: 96%;" src="assets/dunes-cadiz.jpg" alt="White flowers in desert sand" width="800" height="533">
</div>
<button class="intro__replay" type="button">Replay</button>
</section>
<style>
.intro {
position: relative;
overflow: hidden;
background: var(--paper);
}
.intro__stage {
position: relative;
height: var(--stage);
}
.intro__name {
position: absolute;
inset: 50% var(--edge) auto;
z-index: 1;
margin: 0;
transform: translateY(-50%);
font-family: var(--font-display);
font-size: var(--display-l);
font-stretch: var(--stretch-display);
font-weight: var(--weight-display);
line-height: 1;
letter-spacing: var(--track);
text-align: center;
text-transform: uppercase;
text-wrap: balance;
opacity: 0;
filter: blur(12px);
transition: opacity var(--fade) var(--ease-glide), filter var(--fade) var(--ease-glide);
}
.intro.is-named .intro__name {
opacity: 1;
filter: blur(0);
}
/* Each print is placed by its own --x/--y; the script measures the way back to the centre as --dx/--dy. */
.intro__print {
position: absolute;
left: var(--x);
top: var(--y);
z-index: 2;
height: auto;
background: var(--shade);
object-fit: cover;
opacity: 0;
transform: translate(-50%, -50%) translate(var(--dx, 0px), var(--dy, 0px)) scale(0.6);
transition:
transform var(--glide) var(--ease-glide) calc(var(--i, 0) * 45ms),
opacity var(--fade) var(--ease-soft) calc(var(--i, 0) * 45ms),
filter var(--fade) var(--ease-soft);
}
.intro__print--wide { width: var(--print-wide); aspect-ratio: 4 / 3; }
.intro__print--tall { width: var(--print-tall); aspect-ratio: 3 / 4; }
.intro__print--mono { filter: grayscale(1) contrast(1.08); }
.intro__print:first-of-type { z-index: 3; }
.intro.is-seeded .intro__print:first-of-type {
opacity: 1;
}
.intro.is-burst .intro__print {
opacity: 1;
transform: translate(-50%, -50%) translate(0, 0) scale(1);
}
.intro__replay {
position: absolute;
left: var(--edge);
bottom: var(--space-s);
z-index: 4;
min-width: var(--tap);
min-height: var(--tap);
padding: 0 var(--space-s);
border: 0;
background: transparent;
color: var(--ink);
font-family: var(--font-display);
font-size: var(--text-s);
font-stretch: var(--stretch-display);
font-weight: var(--weight-display);
letter-spacing: var(--track);
text-transform: uppercase;
cursor: pointer;
}
.intro__replay:hover,
.intro__replay:focus-visible {
text-decoration: underline;
text-underline-offset: 4px;
}
.intro__replay:focus-visible {
outline: var(--rule) solid var(--ink);
}
@media (max-width: 640px) {
.intro__name {
inset: 50% 0 auto;
max-width: 6.5em;
margin-inline: auto;
font-size: var(--display-xl);
}
}
</style>
<script>
(() => {
const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
for (const root of document.querySelectorAll(".intro")) {
const stage = root.querySelector(".intro__stage");
const prints = [...root.querySelectorAll(".intro__print")];
let timers = [];
const measure = () => {
const box = stage.getBoundingClientRect();
prints.forEach((print, i) => {
print.style.setProperty("--i", i);
const x = (parseFloat(print.style.getPropertyValue("--x")) / 100) * box.width;
const y = (parseFloat(print.style.getPropertyValue("--y")) / 100) * box.height;
print.style.setProperty("--dx", `${box.width / 2 - x}px`);
print.style.setProperty("--dy", `${box.height / 2 - y}px`);
});
};
const play = () => {
timers.forEach(clearTimeout);
root.classList.remove("is-seeded", "is-burst", "is-named");
measure();
if (reduce) {
root.classList.add("is-seeded", "is-burst", "is-named");
return;
}
void root.offsetWidth;
timers = [
setTimeout(() => root.classList.add("is-seeded"), 300),
setTimeout(() => root.classList.add("is-burst"), 900),
setTimeout(() => root.classList.add("is-named"), 1400),
];
};
root.querySelector(".intro__replay").addEventListener("click", play);
window.addEventListener("resize", () => {
if (root.classList.contains("is-burst")) measure();
});
play();
}
})();
</script>