Top bar
Wordmark with a drawn candle, a long grey search pill with a black round button, and a segmented pill of links ending in a black Sign in; on phones a round menu button opens a sheet.
Part of the style
Kraft Panel Split
6 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/kraft-panel-split/topbar/figma.html?palette=8f15323d7284e4bd
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/kraft-panel-split/topbar/figma.html?palette=8f15323d7284e4bd and pass that whole HTML document to the html_to_figma tool, so the part "Top bar" 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 {
--ink: #000000;
--ink-soft: #8c4d36;
--paper: #ff9169;
--paper-warm: #f88d66;
--field: #ed8661;
--stone: #cc7352;
--kraft-deep: #1d0b11;
--veil: rgba(0, 0, 0, 0.5);
--veil-soft: rgba(0, 0, 0, 0.2);
--paper-glass: rgba(255, 145, 105, 0.52);
--night: #dddbdb;
--night-ink: #060203;
--line: rgba(0, 0, 0, 0.08);
--kraft: #9d6e68;
}
</style>
<header class="topbar">
<div class="topbar__bar">
<a class="topbar__brand" href="#" aria-label="Tallow, home">
<svg class="topbar__mark" viewBox="0 0 28 28" width="26" height="26" aria-hidden="true">
<path d="M14 3.2c2.2 2.6 2.9 4.4 2.1 6-.6 1.2-1.6 1.7-2.1 1.7s-1.6-.5-2.1-1.7c-.8-1.6-.1-3.4 2.1-6z" fill="currentColor"/>
<path d="M14 11v2.4" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
<path d="M10.4 13.6h7.2l-.6 9.6h-6z" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round"/>
<path d="M11 16.4c1.6.7 4.4.7 6 0" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round"/>
<path d="M6.5 24.6h15" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/>
<path d="M8.4 24.6c0-1.5.9-2.4 2.4-2.4M19.6 24.6c0-1.5-.9-2.4-2.4-2.4" fill="none" stroke="currentColor" stroke-width="1.1"/>
</svg>
<span class="topbar__word">Tallow</span>
</a>
<form class="topbar__search" role="search" onsubmit="return false">
<svg class="topbar__hint" viewBox="0 0 20 14" width="18" height="13" aria-hidden="true"><path d="M1 3.5h9.5a3 3 0 0 1 0 6H6m0 0 2.4-2.4M6 9.5l2.4 2.4" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/></svg>
<label class="topbar__label" for="topbar-q">Search rooms</label>
<input class="topbar__input" id="topbar-q" type="search" placeholder="Search for rooms…" autocomplete="off">
<button class="topbar__go" type="submit" aria-label="Search">
<svg viewBox="0 0 16 16" width="12" height="12" aria-hidden="true"><circle cx="7" cy="7" r="4.6" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="m10.4 10.4 3.2 3.2" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>
</button>
</form>
<nav class="topbar__nav" aria-label="Main">
<a class="topbar__link" href="#">Reading rooms</a>
<a class="topbar__link" href="#">Listening</a>
<a class="topbar__cta" href="#">Sign in</a>
</nav>
<div class="topbar__phone">
<button class="topbar__toggle" type="button" aria-expanded="false" aria-controls="topbar-sheet" aria-label="Open menu">
<span class="topbar__lines" aria-hidden="true"></span>
</button>
<a class="topbar__cta" href="#">Sign in</a>
</div>
</div>
<div class="topbar__sheet" id="topbar-sheet">
<form class="topbar__search topbar__search--sheet" role="search" onsubmit="return false">
<label class="topbar__label" for="topbar-q2">Search rooms</label>
<input class="topbar__input" id="topbar-q2" type="search" placeholder="Search for rooms…" autocomplete="off">
<button class="topbar__go" type="submit" aria-label="Search">
<svg viewBox="0 0 16 16" width="12" height="12" aria-hidden="true"><circle cx="7" cy="7" r="4.6" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="m10.4 10.4 3.2 3.2" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>
</button>
</form>
<a class="topbar__sheetlink" href="#">Reading rooms</a>
<a class="topbar__sheetlink" href="#">Listening</a>
<a class="topbar__sheetlink" href="#">Small museums</a>
<a class="topbar__sheetlink" href="#">Cities</a>
</div>
</header>
<style>
.topbar {
position: relative;
z-index: 5;
font-size: var(--text-s);
}
.topbar__bar {
display: grid;
grid-template-columns: 1fr minmax(0, 420px) 1fr;
align-items: center;
gap: var(--space-l);
height: var(--bar-height);
padding: 0 var(--edge);
}
.topbar__brand {
display: inline-flex;
align-items: center;
gap: 6px;
justify-self: start;
min-height: 44px;
color: var(--ink);
text-decoration: none;
}
.topbar__word {
font-family: var(--font-serif);
font-size: 23px;
letter-spacing: -0.02em;
}
.topbar__search {
display: flex;
align-items: center;
gap: var(--space-s);
height: 52px;
padding: 0 4px 0 20px;
background: var(--field);
border: var(--rule) solid transparent;
border-radius: var(--pill);
transition: border-color var(--quick) var(--ease), background var(--quick) var(--ease);
}
.topbar__search:focus-within {
background: var(--paper);
border-color: var(--ink);
}
.topbar__hint { flex: none; color: var(--ink-soft); }
.topbar__label {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
}
.topbar__input {
flex: 1;
min-width: 0;
height: 100%;
border: 0;
background: none;
font: inherit;
font-size: var(--text-m);
color: var(--ink);
outline: none;
}
.topbar__input::placeholder { color: var(--ink-soft); }
.topbar__go {
display: grid;
place-items: center;
flex: none;
width: 44px;
height: 44px;
border: 0;
border-radius: var(--pill);
background: var(--ink);
color: var(--paper);
cursor: pointer;
transition: transform var(--quick) var(--spring);
}
.topbar__go:active { transform: scale(0.92); }
.topbar__nav {
display: flex;
align-items: center;
justify-self: end;
gap: 2px;
padding: 4px;
background: var(--field);
border-radius: var(--pill);
}
.topbar__link,
.topbar__cta {
display: inline-flex;
align-items: center;
min-height: 44px;
padding: 0 16px;
border-radius: var(--pill);
font-weight: 500;
text-decoration: none;
white-space: nowrap;
transition: color var(--quick) var(--ease), background var(--quick) var(--ease);
}
.topbar__link { color: var(--ink-soft); }
.topbar__link:hover,
.topbar__link:focus-visible { color: var(--ink); background: var(--paper); }
.topbar__cta { background: var(--ink); color: var(--paper); }
.topbar__cta:hover { background: var(--kraft-deep); }
.topbar a:focus-visible,
.topbar button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.topbar__phone { display: none; }
.topbar__toggle {
display: grid;
place-items: center;
width: 44px;
height: 44px;
border: 0;
border-radius: var(--pill);
background: none;
cursor: pointer;
transition: background var(--quick) var(--ease);
}
.topbar__toggle:hover { background: var(--field); }
.topbar__lines,
.topbar__lines::before,
.topbar__lines::after {
display: block;
width: 18px;
height: 1.5px;
background: var(--ink);
transition: transform var(--quick) var(--ease), background var(--quick) var(--ease);
}
.topbar__lines { position: relative; }
.topbar__lines::before,
.topbar__lines::after { content: ""; position: absolute; left: 0; }
.topbar__lines::before { top: -6px; }
.topbar__lines::after { top: 6px; }
.topbar.is-open .topbar__lines { background: transparent; }
.topbar.is-open .topbar__lines::before { transform: translateY(6px) rotate(45deg); }
.topbar.is-open .topbar__lines::after { transform: translateY(-6px) rotate(-45deg); }
.topbar__sheet {
position: absolute;
top: calc(var(--bar-height) - 8px);
left: var(--edge);
right: var(--edge);
display: grid;
gap: 2px;
padding: var(--space-s);
background: var(--paper);
border-radius: var(--radius-l);
box-shadow: var(--shadow-pop);
opacity: 0;
visibility: hidden;
transform: translateY(-8px);
transform-origin: top right;
transition: opacity var(--quick) var(--ease), transform 180ms var(--spring), visibility 0s linear var(--quick);
}
.topbar.is-open .topbar__sheet {
opacity: 1;
visibility: visible;
transform: none;
transition-delay: 0s;
}
.topbar__search--sheet { margin-bottom: var(--space-s); }
.topbar__sheetlink {
display: flex;
align-items: center;
min-height: 48px;
padding: 0 var(--space-m);
border-radius: var(--radius-s);
color: var(--ink);
font-size: var(--text-m);
text-decoration: none;
transition: background var(--quick) var(--ease);
}
.topbar__sheetlink:hover { background: var(--paper-warm); }
@media (min-width: 56.01rem) {
.topbar__sheet { display: none; }
}
@media (max-width: 56rem) {
.topbar__bar { grid-template-columns: 1fr auto; height: 72px; }
.topbar__bar > .topbar__search,
.topbar__nav { display: none; }
.topbar__phone { display: flex; align-items: center; gap: var(--space-s); }
.topbar__sheet { top: 64px; }
}
</style>
<script>
(() => {
for (const root of document.querySelectorAll('.topbar')) {
const toggle = root.querySelector('.topbar__toggle');
if (!toggle) continue;
const set = (open) => {
root.classList.toggle('is-open', open);
toggle.setAttribute('aria-expanded', String(open));
toggle.setAttribute('aria-label', open ? 'Close menu' : 'Open menu');
};
toggle.addEventListener('click', () => set(!root.classList.contains('is-open')));
root.addEventListener('keydown', (event) => {
if (event.key === 'Escape' && root.classList.contains('is-open')) { set(false); toggle.focus(); }
});
root.querySelectorAll('.topbar__sheetlink').forEach((link) => link.addEventListener('click', () => set(false)));
}
})();
</script>