Typing hero with window
Wordmark over a hairline, a two-line serif headline whose last word types through uses, a grey mono button and links; on the right a browser window scrolls a published page in front of a painted landscape disc.
Part of the style
Cream Serif Window
6 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/cream-serif-window/hero/figma.html
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/cream-serif-window/hero/figma.html and pass that whole HTML document to the html_to_figma tool, so the part "Typing hero with window" 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="hero">
<div class="hero__text">
<a class="hero__brand" href="#" aria-label="Tallow home">
<svg class="hero__mark" viewBox="0 0 24 24" width="20" height="20" aria-hidden="true">
<path d="M5 15a7 7 0 0 1 14 0Z" fill="currentColor" />
<path d="M2 18.5h20" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" />
</svg>
<span class="hero__wordmark">tallow</span>
</a>
<h1 class="hero__title">
<span class="hero__line">A quiet desk for the long read.</span>
<span class="hero__line hero__line--soft">People keep Tallow for <span class="hero__word" aria-live="off">letters</span><span class="hero__caret" aria-hidden="true"></span></span>
</h1>
<ul class="hero__words" hidden>
<li>letters</li>
<li>field notes</li>
<li>recipes</li>
<li>photo diaries</li>
<li>essays</li>
</ul>
<a class="hero__button" href="#">Begin a page <span class="hero__arrow" aria-hidden="true">→</span></a>
<nav class="hero__links" aria-label="Secondary">
<a class="hero__link" href="#">Changelog</a>
<a class="hero__link" href="#">Privacy</a>
</nav>
</div>
<div class="hero__stage">
<img class="hero__disc" src="assets/wheat.jpg" alt="Painted fields at the end of summer" width="1200" height="709" />
<div class="hero__window">
<div class="hero__chrome" aria-hidden="true"><i></i><i></i><i></i></div>
<div class="hero__viewport">
<div class="hero__track">
<div class="hero__page">
<img class="hero__avatar" src="assets/portrait.jpg" alt="Painted portrait of a seated man" width="488" height="600" />
<p class="hero__name">Edmund Hale</p>
<p class="hero__bio">Keeps a notebook on bread, weather and slow walks.</p>
<hr class="hero__rule" />
<p class="hero__post">Still life, late August</p>
<p class="hero__copy">Three pears and the last grapes from the wall. I painted badly, then wrote about it well, which is the better half of most afternoons.</p>
<figure class="hero__panel"><img class="hero__plate" src="assets/pears.jpg" alt="Painted grapes, pears and apples on a lilac cloth" width="800" height="662" /></figure>
<p class="hero__post">The tulip vase</p>
<p class="hero__copy">Five spouts, one stem. A note on the blue and white jar that sits on the sill and never holds what it was made for.</p>
<figure class="hero__panel hero__panel--stone"><img class="hero__plate hero__plate--tall" src="assets/vase.jpg" alt="Blue and white ceramic flower vase with five spouts" width="724" height="800" /></figure>
</div>
</div>
</div>
</div>
</div>
</section>
<style>
.hero {
position: relative;
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
align-items: center;
min-height: clamp(36rem, 62vw, 56rem);
overflow: hidden;
background: var(--paper);
}
.hero__text {
position: relative;
z-index: 2;
padding: var(--space-l) var(--gap) var(--space-l) var(--edge);
max-width: calc(var(--measure) + var(--edge) + var(--gap));
}
.hero__brand {
display: inline-flex;
align-items: center;
gap: 0.4rem;
min-height: 44px;
color: var(--ink);
text-decoration: none;
}
.hero__mark { flex: none; }
.hero__wordmark {
font-family: var(--font-serif);
font-size: 1.6rem;
font-weight: 500;
letter-spacing: -0.01em;
}
.hero__title {
margin: 0;
padding-top: var(--space-l);
margin-top: var(--space-m);
border-top: var(--line) solid var(--rule);
font-size: var(--text-display);
font-weight: 500;
line-height: var(--lead-display);
}
.hero__line { display: block; }
.hero__line--soft { font-weight: 400; }
.hero__caret {
display: inline-block;
width: 1.5px;
height: 1.05em;
margin-left: 2px;
vertical-align: -0.15em;
background: var(--ink);
animation: hero-blink 1s steps(1) infinite;
}
@keyframes hero-blink { 50% { opacity: 0; } }
.hero__button {
display: inline-flex;
align-items: center;
gap: 0.6rem;
min-height: 44px;
margin-top: var(--space-m);
padding: 0 1rem;
border-radius: var(--radius-s);
background: var(--wash);
color: var(--ink);
font: 400 var(--text-s) / 1 var(--font-mono);
text-decoration: none;
transition: background-color var(--quick) ease;
}
.hero__button:hover, .hero__button:focus-visible { background: var(--wash-strong); }
.hero__button:focus-visible, .hero__link:focus-visible, .hero__brand:focus-visible { outline: var(--line) solid var(--ink); outline-offset: 3px; }
.hero__arrow { transition: transform var(--step) var(--ease); }
.hero__button:hover .hero__arrow { transform: translateX(3px); }
.hero__links {
display: flex;
gap: var(--space-s);
margin-top: var(--space-xl);
}
.hero__link {
display: inline-flex;
align-items: center;
min-height: 44px;
color: var(--ink-soft);
font: 400 var(--text-xs) / 1 var(--font-mono);
text-decoration: underline;
text-underline-offset: 3px;
transition: color var(--step) var(--ease);
}
.hero__link:hover { color: var(--ink); }
/* The stage: a painted disc sliding off the right edge, a window laid over it */
.hero__stage {
position: relative;
align-self: stretch;
min-height: 32rem;
}
.hero__disc {
position: absolute;
top: 50%;
left: 0;
width: clamp(30rem, 62vw, 62rem);
aspect-ratio: 1;
translate: 0 -50%;
border-radius: var(--round);
object-fit: cover;
object-position: 60% 50%;
}
.hero__window {
position: absolute;
top: clamp(3rem, 6vw, 5rem);
bottom: clamp(3rem, 6vw, 5rem);
left: clamp(3rem, 5vw, 5.5rem);
right: -2rem;
display: flex;
flex-direction: column;
border-radius: var(--radius-l) 0 0 var(--radius-l);
background: var(--sheet);
box-shadow: var(--shadow-window);
overflow: hidden;
}
.hero__chrome {
display: flex;
gap: 6px;
flex: none;
padding: 10px 14px;
background: var(--chrome);
border-bottom: var(--line) solid var(--rule);
}
.hero__chrome i { width: 9px; height: 9px; border-radius: var(--round); background: var(--dot); }
.hero__viewport {
position: relative;
flex: 1;
overflow: hidden;
}
.hero__track {
animation: hero-scroll 40s linear infinite;
animation-play-state: paused;
}
.hero.is-running .hero__track { animation-play-state: running; }
.hero.is-running .hero__window:hover .hero__track { animation-play-state: paused; }
@keyframes hero-scroll { to { transform: translateY(-50%); } }
.hero__page {
width: min(100% - 3rem, 24rem);
margin: 0 auto;
padding: var(--space-l) 0 var(--space-m);
text-align: center;
font-size: 0.85rem;
line-height: 1.75;
}
.hero__avatar {
width: 40px;
height: 40px;
margin: 0 auto 0.8rem;
border-radius: var(--round);
object-fit: cover;
object-position: 50% 12%;
}
.hero__name { margin: 0; font-weight: 500; }
.hero__bio { margin: 0 0 var(--space-m); }
.hero__rule { border: 0; border-top: var(--line) solid var(--rule); margin: 0 0 var(--space-m); }
.hero__post { margin: var(--space-m) 0 0.6rem; font-weight: 500; }
.hero__copy { margin: 0 0 var(--space-s); text-align: left; }
.hero__panel {
display: grid;
place-items: center;
margin: 0;
padding: 1.6rem;
aspect-ratio: 4 / 3;
border-radius: var(--radius-l);
background: var(--panel-warm);
}
.hero__panel--stone { background: var(--panel-stone); }
.hero__plate {
width: 70%;
height: 100%;
object-fit: cover;
border-radius: var(--radius-s);
}
.hero__plate--tall { width: 52%; object-fit: contain; }
@media (max-width: 56rem) {
.hero { grid-template-columns: 1fr; min-height: 0; }
.hero__text { max-width: none; padding: var(--space-l) var(--edge) var(--space-m); }
.hero__links { margin-top: var(--space-m); }
.hero__stage { min-height: 30rem; }
.hero__stage { overflow: hidden; }
.hero__disc { top: 0; translate: none; width: 30rem; left: 18%; }
.hero__window {
top: 2rem;
bottom: 0;
left: var(--edge);
right: var(--edge);
width: auto;
border-radius: var(--radius-l) var(--radius-l) 0 0;
}
}
@media (prefers-reduced-motion: reduce) {
.hero__track, .hero__caret { animation: none; }
}
</style>
<script>
(() => {
const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
for (const root of document.querySelectorAll('.hero')) {
const page = root.querySelector('.hero__page');
const copy = page.cloneNode(true);
copy.setAttribute('aria-hidden', 'true');
copy.querySelectorAll('img').forEach((img) => { img.alt = ''; });
root.querySelector('.hero__track').append(copy);
const word = root.querySelector('.hero__word');
const words = [...root.querySelectorAll('.hero__words li')].map((li) => li.textContent.trim());
let visible = false;
let timer = 0;
let index = 0;
let shown = word.textContent;
const tick = () => {
if (!visible) return;
const target = words[index];
if (shown === target) {
timer = setTimeout(() => { index = (index + 1) % words.length; erase(); }, 1600);
return;
}
shown = target.slice(0, shown.length + 1);
word.textContent = shown;
timer = setTimeout(tick, 70);
};
const erase = () => {
if (!visible) return;
if (!shown.length) { timer = setTimeout(tick, 250); return; }
shown = shown.slice(0, -1);
word.textContent = shown;
timer = setTimeout(erase, 35);
};
new IntersectionObserver(([entry]) => {
visible = entry.isIntersecting;
root.classList.toggle('is-running', visible && !reduce);
clearTimeout(timer);
if (visible && !reduce) timer = setTimeout(() => { index = (index + 1) % words.length; erase(); }, 3200);
}).observe(root);
}
})();
</script>