Header
Yellow top band with the orange wordmark and a white chip holding tiny uppercase links and a language switch; on phones a white square opens the links.
Part of the style
Pixel Map Yellow
7 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/pixel-map-yellow/header/figma.html?palette=f358bf308fa14979
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/pixel-map-yellow/header/figma.html?palette=f358bf308fa14979 and pass that whole HTML document to the html_to_figma tool, so the part "Header" 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: #b7a6ee;
--ink: #160e1b;
--white: #f7f5ff;
--field: #b0a0e5;
--ink-soft: rgba(22, 14, 27, 0.6);
--flame: #937bb8;
--sun: #a96ace;
--sun-pale: #9b6cb8;
--sea: #a071bc;
--sky: #a36dc4;
}
</style>
<header class="header">
<a class="header__brand" href="#" aria-label="Valdorna, home">
<span class="header__word">valdorna</span>
<svg class="header__pixels" viewBox="0 0 3 3" aria-hidden="true">
<rect x="0" y="2" width="1" height="1"/><rect x="1" y="2" width="1" height="1"/><rect x="2" y="2" width="1" height="1"/><rect x="1" y="1" width="1" height="1"/><rect x="2" y="1" width="1" height="1"/><rect x="2" y="0" width="1" height="1"/>
</svg>
</a>
<button class="header__toggle" type="button" aria-expanded="false" aria-controls="header-menu" aria-label="Menu">
<span class="header__bars" aria-hidden="true"></span>
</button>
<nav class="header__nav" id="header-menu" aria-label="Main">
<ul class="header__links">
<li><a class="header__link" href="#">Walks and listenings</a></li>
<li><a class="header__link" href="#">Villages</a></li>
<li><a class="header__link" href="#">Residents</a></li>
<li><a class="header__link" href="#">About</a></li>
<li><a class="header__link" href="#">Field notes</a></li>
<li><a class="header__link" href="#">Open call</a></li>
</ul>
<div class="header__langs">
<a class="header__lang is-current" href="#" aria-current="true">EN</a>
<a class="header__lang" href="#">PT</a>
</div>
</nav>
</header>
<style>
.header {
position: relative;
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: var(--gap);
padding: var(--space-m) var(--edge) var(--space-l);
background: var(--sun);
color: var(--ink);
}
.header__brand {
display: inline-flex;
align-items: flex-end;
gap: 0.12em;
min-height: var(--button-h);
color: var(--flame);
text-decoration: none;
}
.header__pixels {
width: 0.42em;
height: 0.42em;
margin-bottom: 0.14em;
font-size: var(--display-l);
fill: currentColor;
}
.header__word {
font-size: var(--display-l);
line-height: 1;
letter-spacing: -0.02em;
}
.header__nav {
display: flex;
align-items: stretch;
background: var(--white);
}
.header__links {
display: flex;
flex-wrap: wrap;
margin: 0;
padding: 0 var(--space-s);
list-style: none;
}
.header__link,
.header__lang {
display: flex;
align-items: center;
justify-content: center;
min-width: var(--button-h);
min-height: var(--button-h);
padding: 0 var(--space-s);
color: var(--ink);
font-size: var(--text-xs);
line-height: var(--leading-tight);
text-decoration: none;
text-transform: uppercase;
transition: color var(--quick) var(--ease);
}
.header__link:hover,
.header__link:focus-visible,
.header__lang:hover,
.header__lang:focus-visible {
color: var(--flame);
}
.header__link:focus-visible,
.header__lang:focus-visible,
.header__toggle:focus-visible {
outline: var(--rule) solid var(--flame);
outline-offset: -4px;
}
.header__langs {
display: flex;
padding: 0 var(--space-xs);
background: var(--sun-pale);
}
.header__lang.is-current {
color: var(--flame);
}
.header__toggle {
display: none;
place-items: center;
width: 52px;
height: 52px;
border: 0;
border-radius: var(--radius);
background: var(--white);
color: var(--ink);
cursor: pointer;
}
.header__bars,
.header__bars::before,
.header__bars::after {
display: block;
width: 20px;
height: 2px;
background: currentColor;
transition: transform var(--quick) var(--ease), background-color var(--quick) var(--ease);
}
.header__bars { position: relative; }
.header__bars::before,
.header__bars::after {
content: "";
position: absolute;
left: 0;
}
.header__bars::before { top: -6px; }
.header__bars::after { top: 6px; }
.header.is-open .header__bars { background: transparent; }
.header.is-open .header__bars::before { transform: translateY(6px) rotate(45deg); }
.header.is-open .header__bars::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 64rem) {
.header { align-items: center; }
.header__toggle { display: grid; }
.header__nav {
position: absolute;
top: calc(100% - var(--space-m));
right: var(--edge);
left: var(--edge);
z-index: 5;
flex-direction: column;
visibility: hidden;
opacity: 0;
transform: translateY(-8px);
transition: opacity var(--quick) var(--ease), transform var(--quick) var(--ease), visibility 0s linear var(--quick);
}
.header.is-open .header__nav {
visibility: visible;
opacity: 1;
transform: none;
transition-delay: 0s;
}
.header__links {
flex-direction: column;
padding: var(--space-s) 0;
}
.header__link {
padding: 0 var(--space-m);
font-size: var(--text-l);
text-transform: none;
border-top: var(--rule) var(--rule-style) var(--ink);
}
.header__links li:first-child .header__link { border-top: 0; }
.header__langs { padding: 0 var(--space-s); }
}
</style>
<script>
(() => {
document.querySelectorAll(".header").forEach((root) => {
const toggle = root.querySelector(".header__toggle");
if (!toggle) return;
const set = (open) => {
root.classList.toggle("is-open", open);
toggle.setAttribute("aria-expanded", String(open));
};
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(".header__link").forEach((link) => link.addEventListener("click", () => set(false)));
});
})();
</script>