Hero with editor window
Version chip, two-line headline, two pills, then a dark editor window with layers, a white page on the canvas and an assistant pane whose steps tick in.
Part of the style
Night Editor Chrome
7 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/night-editor-chrome/hero/figma.html?palette=ceb9ad4e392cb22e
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/night-editor-chrome/hero/figma.html?palette=ceb9ad4e392cb22e and pass that whole HTML document to the html_to_figma tool, so the part "Hero with editor 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
<style>
/* Goes after the pack's base.css */
:root {
--paper: #5381c3;
--ink: #1c0e05;
--ink-soft: rgba(28, 14, 5, 0.7);
--ink-mute: rgba(28, 14, 5, 0.45);
--ink-dark: #5381c3;
--surface: rgba(28, 14, 5, 0.05);
--surface-up: rgba(28, 14, 5, 0.08);
--surface-top: rgba(28, 14, 5, 0.14);
--line: rgba(28, 14, 5, 0.1);
--line-strong: rgba(28, 14, 5, 0.18);
--chrome: #4f7ab9;
--chrome-deep: #517ebe;
--sheet: #1c0e05;
--sheet-ink: #6785b1;
--sheet-line: #2b170a;
--signal: #ffe6eb;
--signal-deep: #ac989c;
--select: #fff6f7;
--ok: #113807;
}
</style>
<section class="hero">
<div class="hero__intro">
<p class="hero__chip">
<span class="hero__chip-dot" aria-hidden="true"></span>
v3.8 <span class="hero__chip-sep" aria-hidden="true">·</span> <span class="hero__chip-soft">Just shipped</span>
</p>
<h1 class="hero__title">The layout desk for newsletters written by people and their assistants</h1>
<p class="hero__lede">Draft in the browser, set every column by hand, and send to your readers from the same window.</p>
<div class="hero__actions">
<a class="hero__pill hero__pill--solid" href="#">Start writing</a>
<a class="hero__pill hero__pill--ghost" href="#">
<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><rect x="2" y="3" width="12" height="10" rx="2" fill="none" stroke="currentColor" stroke-width="1.4"/><path d="M5 7l2 1.5L5 10" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/></svg>
Read the source
</a>
</div>
</div>
<div class="hero__window" role="img" aria-label="The Tidemark editor: a layer list, a newsletter page on the canvas and an assistant reworking its header">
<div class="hero__toolbar">
<span class="hero__key" aria-hidden="true">
<svg viewBox="0 0 28 28" width="16" height="16"><path d="M3 9.5c3.2-2.6 6.3-2.6 9.5 0s6.3 2.6 9.5 0M3 17.5c3.2-2.6 6.3-2.6 9.5 0s6.3 2.6 9.5 0" fill="none" stroke="currentColor" stroke-width="3.4" stroke-linecap="round"/></svg>
</span>
<span class="hero__saving">Saving…</span>
<span class="hero__key hero__key--play" aria-hidden="true"><svg viewBox="0 0 10 10" width="9" height="9"><path d="M2 1l7 4-7 4z" fill="currentColor"/></svg></span>
<span class="hero__publish">Send</span>
</div>
<div class="hero__panes">
<div class="hero__pane hero__pane--layers">
<div class="hero__seg"><span class="hero__seg-item is-on">Layers</span><span class="hero__seg-item">Issues</span></div>
<div class="hero__pane-head"><span>Issue 41</span><span class="hero__plus" aria-hidden="true">+</span></div>
<ul class="hero__tree">
<li class="hero__row" style="--depth: 0"><span class="hero__caret">⌄</span><span class="hero__box"></span>Page</li>
<li class="hero__row" style="--depth: 1"><span class="hero__box"></span>Masthead</li>
<li class="hero__row is-picked" style="--depth: 1"><span class="hero__caret">⌄</span><span class="hero__box"></span>Lead story</li>
<li class="hero__row is-child" style="--depth: 2"><span class="hero__caret">⌄</span><span class="hero__box"></span>Column</li>
<li class="hero__row is-child" style="--depth: 3"><span class="hero__box"></span>Headline</li>
<li class="hero__row is-child" style="--depth: 3"><span class="hero__box"></span>Plate</li>
<li class="hero__row" style="--depth: 1"><span class="hero__box"></span>Letters</li>
</ul>
</div>
<div class="hero__canvas">
<div class="hero__canvas-bar">
<div class="hero__seg hero__seg--small"><span class="hero__seg-item is-on">Desktop</span><span class="hero__seg-item">Inbox</span><span class="hero__seg-item">Print</span></div>
<span class="hero__zoom">100%</span>
</div>
<div class="hero__page">
<div class="hero__page-nav">
<span class="hero__page-brand"><i></i>Saltline</span>
<span class="hero__page-links"><span>Archive</span><span>About</span><span>Letters</span></span>
<span class="hero__page-btn">Subscribe</span>
</div>
<div class="hero__page-body">
<div class="hero__page-copy">
<span class="hero__page-tag">Issue 41 · Spring</span>
<p class="hero__page-head hero__target hero__target--head">Notes from the <em>low</em> tide</p>
<p class="hero__page-text">Six weeks on the north coast, one camera and a tide table.</p>
</div>
<figure class="hero__page-plate hero__target hero__target--plate">
<img src="assets/lighthouse-rocks.jpg" alt="Bathers on a rocky beach below a cliff" width="1200" height="712" loading="lazy">
</figure>
</div>
</div>
</div>
<div class="hero__pane hero__pane--agent">
<div class="hero__seg"><span class="hero__seg-item">Writer</span><span class="hero__seg-item is-on">Assistant</span></div>
<div class="hero__field"><span>New thread</span><span aria-hidden="true">⌄</span></div>
<p class="hero__bubble">Make the lead story a two-column spread</p>
<p class="hero__working"><span class="hero__spin" aria-hidden="true"></span>Working…</p>
<ol class="hero__steps">
<li class="hero__step">Reading the layers</li>
<li class="hero__step">Splitting the column</li>
<li class="hero__step">Moving the plate right</li>
<li class="hero__step">Tightening the headline</li>
</ol>
</div>
</div>
</div>
</section>
<style>
.hero {
padding: clamp(56px, 8vw, 120px) var(--edge) 0;
overflow: hidden;
}
.hero__intro {
max-width: 880px;
}
.hero__chip {
display: inline-flex;
align-items: center;
gap: 6px;
min-height: 26px;
padding: 0 10px;
border: var(--rule) solid var(--line-strong);
border-radius: var(--radius-pill);
background: var(--surface);
color: var(--ink-soft);
font-size: var(--text-xs);
margin: 0;
}
.hero__chip-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--ok);
}
.hero__chip-sep,
.hero__chip-soft { color: var(--ink-mute); }
.hero__title {
margin: var(--space-m) 0 0;
font-size: var(--text-xxl);
font-weight: var(--weight-medium);
line-height: 1;
letter-spacing: var(--track-tight);
text-wrap: balance;
}
.hero__lede {
margin: var(--space-m) 0 0;
max-width: 640px;
color: var(--ink-soft);
font-size: var(--text-m);
line-height: 1.6;
}
.hero__actions {
display: flex;
flex-wrap: wrap;
gap: var(--space-s);
margin-top: var(--space-l);
}
.hero__pill {
display: inline-flex;
align-items: center;
gap: var(--space-s);
min-height: 44px;
padding: 0 18px;
border: var(--rule) solid var(--line-strong);
border-radius: var(--radius-pill);
color: var(--ink);
font-size: var(--text-m);
text-decoration: none;
transition: background-color var(--quick) var(--ease);
}
.hero__pill--solid {
border-color: var(--ink);
background: var(--ink);
color: var(--ink-dark);
}
.hero__pill--solid:hover,
.hero__pill--solid:focus-visible { background: var(--ink-soft); }
.hero__pill--ghost:hover,
.hero__pill--ghost:focus-visible { background: var(--surface-up); }
.hero a:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
/* The editor window */
.hero__window {
margin-top: clamp(48px, 6vw, 72px);
padding: 6px;
border: var(--rule) solid var(--line);
border-bottom: 0;
border-radius: var(--radius-card) var(--radius-card) 0 0;
background: var(--surface);
box-shadow: var(--shadow-window);
font-size: var(--text-xs);
color: var(--ink-soft);
}
.hero__toolbar {
display: flex;
align-items: center;
gap: var(--space-s);
padding: 10px 12px;
border: var(--rule) solid var(--line);
border-bottom: 0;
border-radius: var(--radius-panel) var(--radius-panel) 0 0;
background: var(--chrome);
}
.hero__key {
display: grid;
place-items: center;
width: 30px;
height: 30px;
border-radius: 8px;
background: var(--surface-up);
color: var(--ink);
}
.hero__saving {
margin-left: auto;
background: linear-gradient(90deg, var(--ink-mute) 0 40%, var(--ink) 50%, var(--ink-mute) 60% 100%) 0 0 / 300% 100%;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: hero-shimmer 2.4s linear infinite;
}
.hero__publish {
display: grid;
place-items: center;
height: 30px;
padding: 0 12px;
border-radius: 8px;
background: var(--signal);
color: var(--ink);
font-weight: var(--weight-medium);
}
.hero__panes {
display: grid;
grid-template-columns: minmax(170px, 0.22fr) minmax(0, 1fr) minmax(200px, 0.26fr);
height: clamp(300px, 34vw, 440px);
border: var(--rule) solid var(--line);
border-bottom: 0;
background: var(--chrome);
}
.hero__pane {
display: flex;
flex-direction: column;
gap: var(--space-m);
padding: var(--space-m);
background: var(--chrome-deep);
overflow: hidden;
}
.hero__pane--layers { border-right: var(--rule) solid var(--line); }
.hero__pane--agent { border-left: var(--rule) solid var(--line); }
.hero__seg {
display: flex;
padding: 3px;
border-radius: 8px;
background: var(--surface-up);
}
.hero__seg-item {
flex: 1;
padding: 5px 10px;
border-radius: 6px;
text-align: center;
color: var(--ink-mute);
white-space: nowrap;
}
.hero__seg-item.is-on {
background: var(--surface-top);
color: var(--ink);
}
.hero__seg--small .hero__seg-item { flex: none; }
.hero__pane-head {
display: flex;
align-items: center;
justify-content: space-between;
color: var(--ink);
font-weight: var(--weight-medium);
}
.hero__plus {
display: grid;
place-items: center;
width: 24px;
height: 24px;
border-radius: 6px;
background: var(--surface-up);
color: var(--ink-soft);
}
.hero__tree {
margin: 0 calc(var(--space-m) * -1);
padding: 0;
list-style: none;
}
.hero__row {
display: flex;
align-items: center;
gap: 6px;
height: 30px;
padding-left: calc(var(--space-m) + var(--depth) * 14px);
color: var(--ink-mute);
white-space: nowrap;
}
.hero__row.is-picked {
background: var(--signal);
color: var(--ink);
}
.hero__row.is-child {
background: var(--signal-deep);
color: var(--ink-soft);
}
.hero__caret { width: 10px; font-size: 10px; }
.hero__row:not(:has(.hero__caret))::before { content: ""; width: 10px; }
.hero__box {
width: 11px;
height: 9px;
border: 1.2px solid currentColor;
border-radius: 2px;
opacity: 0.8;
}
.hero__canvas {
display: flex;
flex-direction: column;
min-width: 0;
overflow: hidden;
}
.hero__canvas-bar {
display: flex;
align-items: center;
justify-content: center;
gap: var(--space-s);
padding: 10px;
border-bottom: var(--rule) solid var(--line);
}
.hero__zoom {
padding: 5px 10px;
border-radius: 8px;
background: var(--surface-up);
}
.hero__page {
flex: 1;
margin: clamp(12px, 2vw, 24px) clamp(12px, 3.4vw, 48px) 0;
padding: 10px 16px 0;
border-radius: 4px 4px 0 0;
background: var(--sheet);
color: var(--ink-dark);
overflow: hidden;
}
.hero__page-nav {
display: flex;
align-items: center;
gap: var(--space-m);
font-size: 9px;
}
.hero__page-brand {
display: flex;
align-items: center;
gap: 4px;
font-weight: 600;
}
.hero__page-brand i {
width: 10px;
height: 10px;
border-radius: 3px;
background: var(--ink-dark);
}
.hero__page-links {
display: flex;
gap: 12px;
margin: 0 auto;
color: var(--sheet-ink);
}
.hero__page-btn {
padding: 3px 7px;
border-radius: 4px;
background: var(--ink-dark);
color: var(--sheet);
}
.hero__page-body {
display: grid;
grid-template-columns: 1fr;
gap: 14px;
padding: clamp(14px, 3vw, 36px) clamp(0px, 2vw, 24px);
}
.hero__page-tag {
display: inline-block;
padding: 2px 7px;
border: var(--rule) solid var(--sheet-line);
border-radius: var(--radius-pill);
color: var(--sheet-ink);
font-size: 8px;
}
.hero__page-head {
margin: 8px 0 0;
font-size: clamp(18px, 2.4vw, 30px);
font-weight: 600;
line-height: 1;
letter-spacing: -0.04em;
}
.hero__page-head em {
font-family: var(--font-accent);
font-weight: 400;
letter-spacing: 0;
}
.hero__page-text {
margin: 8px 0 0;
max-width: 24ch;
color: var(--sheet-ink);
font-size: 10px;
line-height: 1.4;
}
.hero__page-plate {
margin: 0;
aspect-ratio: 16 / 9;
border-radius: 4px;
overflow: hidden;
}
.hero__page-plate img {
width: 100%;
height: 100%;
object-fit: cover;
}
/* The selection box walks between the headline and the plate as the assistant works */
.hero__target {
outline: 1.5px solid transparent;
outline-offset: 4px;
transition: outline-color var(--time) var(--ease);
}
.hero__window:not(.is-late) .hero__target--head,
.hero__window.is-late .hero__target--plate {
outline-color: var(--select);
}
.hero__window.is-split .hero__page-body {
grid-template-columns: 1fr 1.1fr;
align-items: center;
}
.hero__field {
display: flex;
justify-content: space-between;
padding: 8px 10px;
border-radius: 8px;
background: var(--surface-up);
}
.hero__bubble {
align-self: flex-end;
max-width: 90%;
margin: 0;
padding: 8px 12px;
border: var(--rule) solid var(--line-strong);
border-radius: var(--radius-panel);
background: var(--surface);
color: var(--ink);
line-height: 1.4;
}
.hero__working {
display: flex;
align-items: center;
gap: 6px;
margin: 0;
}
.hero__spin {
width: 11px;
height: 11px;
border: 1.5px solid var(--line-strong);
border-top-color: var(--ink);
border-radius: 50%;
animation: hero-spin 0.9s linear infinite;
}
.hero__steps {
display: grid;
gap: 6px;
margin: 0;
padding: 0 0 0 12px;
border-left: var(--rule) solid var(--line-strong);
list-style: none;
}
.hero__step {
display: flex;
gap: 6px;
opacity: 0.25;
transition: opacity var(--time) var(--ease);
}
.hero__step::before {
content: "✓";
color: var(--ink-mute);
}
.hero__step.is-done { opacity: 1; }
.hero__step.is-done::before { color: var(--ok); }
.hero__window.is-paused .hero__saving,
.hero__window.is-paused .hero__spin { animation-play-state: paused; }
@keyframes hero-spin { to { transform: rotate(1turn); } }
@keyframes hero-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (max-width: 980px) {
.hero__panes { grid-template-columns: minmax(150px, 0.3fr) minmax(0, 1fr); }
.hero__pane--agent { display: none; }
}
@media (max-width: 640px) {
.hero__panes { grid-template-columns: minmax(0, 1fr); height: 300px; }
.hero__pane--layers { display: none; }
.hero__page-links { display: none; }
.hero__page-btn { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
.hero__saving { animation: none; color: var(--ink-mute); }
.hero__spin { animation: none; }
.hero__step { opacity: 1; }
}
</style>
<script>
(() => {
const still = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
for (const root of document.querySelectorAll('.hero')) {
const win = root.querySelector('.hero__window');
const steps = [...root.querySelectorAll('.hero__step')];
if (!win || !steps.length) continue;
let index = 0;
let timer = 0;
let visible = false;
const show = (n) => {
steps.forEach((step, i) => step.classList.toggle('is-done', i < n));
win.classList.toggle('is-split', n >= 2);
win.classList.toggle('is-late', n >= 3);
};
if (still) { show(steps.length); continue; }
show(1);
index = 1;
const tick = () => {
index = index > steps.length ? 0 : index + 1;
show(Math.min(index, steps.length));
timer = setTimeout(tick, index >= steps.length ? 2400 : 1100);
};
new IntersectionObserver(([entry]) => {
visible = entry.isIntersecting;
win.classList.toggle('is-paused', !visible);
clearTimeout(timer);
if (visible) timer = setTimeout(tick, 1100);
}).observe(win);
}
})();
</script>