Drifting statement
A large cream sentence with small photographs scattered around it that drift against the pointer.
Part of the style
Amber Swash Darkroom
7 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/amber-swash-darkroom/statement/figma.html
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/amber-swash-darkroom/statement/figma.html and pass that whole HTML document to the html_to_figma tool, so the part "Drifting statement" 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="statement">
<div class="statement__field" aria-hidden="true">
<img class="statement__thumb statement__thumb--wide" style="--x: 6%; --y: 4%; --w: 7.5rem; --depth: 0.6" src="assets/poster-dancer.jpg" alt="" width="120" height="90">
<img class="statement__thumb" style="--x: 68%; --y: 9%; --w: 3.4rem; --depth: 1.4" src="assets/self-portrait.jpg" alt="" width="54" height="64">
<img class="statement__thumb" style="--x: 6%; --y: 74%; --w: 3.8rem; --depth: 1.1" src="assets/acrobats.jpg" alt="" width="60" height="72">
<img class="statement__thumb statement__thumb--wide" style="--x: 80%; --y: 58%; --w: 6rem; --depth: 0.8" src="assets/moulin.jpg" alt="" width="96" height="72">
<img class="statement__thumb" style="--x: 50%; --y: 80%; --w: 2.8rem; --depth: 1.8" src="assets/laundress.jpg" alt="" width="45" height="54">
<img class="statement__thumb" style="--x: 90%; --y: 22%; --w: 2.6rem; --depth: 2" src="assets/ballet.jpg" alt="" width="42" height="50">
</div>
<p class="statement__text">We don’t light a room so it can be seen. We light it so you <em>remember</em> being in it.</p>
<p class="statement__sign">— the studio, since the first roll</p>
</section>
<style>
.statement {
position: relative;
display: grid;
align-content: center;
gap: var(--space-l);
min-height: clamp(32rem, 50vw, 44rem);
padding: var(--section-space) var(--edge);
overflow: hidden;
background: var(--paper);
color: var(--cream);
}
.statement__field {
position: absolute;
inset: 0;
pointer-events: none;
}
.statement__thumb {
position: absolute;
left: var(--x);
top: var(--y);
width: var(--w);
height: auto;
aspect-ratio: 5 / 6;
object-fit: cover;
filter: sepia(0.25) saturate(1.2) contrast(1.05);
translate: var(--dx, 0px) var(--dy, 0px);
opacity: 0;
transition: opacity var(--slow) var(--ease);
transition-delay: calc(var(--order, 0) * 140ms);
}
.statement__thumb--wide {
aspect-ratio: 4 / 3;
}
.statement.is-seen .statement__thumb {
opacity: 1;
}
.statement__text {
position: relative;
max-width: 15em;
margin: 0 0 0 clamp(0rem, 18vw, 18rem);
font-family: var(--font-display);
font-size: var(--display-l);
font-weight: 300;
line-height: 1.05;
letter-spacing: -0.01em;
text-wrap: balance;
}
.statement__text em {
color: var(--amber);
font-weight: 400;
}
.statement__sign {
position: relative;
margin: 0 0 0 clamp(0rem, 18vw, 18rem);
color: var(--amber);
font-size: var(--text-s);
letter-spacing: var(--label-track);
text-transform: uppercase;
}
@media (max-width: 40rem) {
.statement__thumb {
width: calc(var(--w) * 0.7);
}
}
@media (prefers-reduced-motion: reduce) {
.statement__thumb {
opacity: 1;
translate: none;
transition: none;
}
}
</style>
<script>
(() => {
const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
for (const root of document.querySelectorAll('.statement')) {
const thumbs = [...root.querySelectorAll('.statement__thumb')];
thumbs.forEach((el, i) => el.style.setProperty('--order', i));
let tx = 0, ty = 0, cx = 0, cy = 0, frame = 0, visible = false;
const step = () => {
cx += (tx - cx) * 0.06;
cy += (ty - cy) * 0.06;
for (const el of thumbs) {
const d = parseFloat(el.style.getPropertyValue('--depth')) || 1;
el.style.setProperty('--dx', `${(-cx * 28 * d).toFixed(2)}px`);
el.style.setProperty('--dy', `${(-cy * 22 * d).toFixed(2)}px`);
}
if (visible && (Math.abs(tx - cx) > 0.001 || Math.abs(ty - cy) > 0.001)) frame = requestAnimationFrame(step);
else frame = 0;
};
new IntersectionObserver(([entry]) => {
visible = entry.isIntersecting;
if (visible) root.classList.add('is-seen');
}, { threshold: 0.1 }).observe(root);
if (reduce) continue;
root.addEventListener('pointermove', (e) => {
const r = root.getBoundingClientRect();
tx = (e.clientX - r.left) / r.width - 0.5;
ty = (e.clientY - r.top) / r.height - 0.5;
if (!frame && visible) frame = requestAnimationFrame(step);
});
root.addEventListener('pointerleave', () => {
tx = 0; ty = 0;
if (!frame && visible) frame = requestAnimationFrame(step);
});
}
})();
</script>