kitbash Sign in Connect agent
Components

Floating chip bar

Three floating chips: dark brand chip with region switch, grey link pill, dark talk chip with a portrait; a menu panel on narrow screens.

Part of the style

Swatch Tile Console

7 parts that belong together, with their tokens, type and rules.

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --ink: #fff7f2;
  --paper: #796a54;
  --mist: #73654f;
  --graphite: #fff6f2;
  --smoke: #fff9f5;
  --ink-soft: #827460;
  --ink-faint: #5c4f3b;
  --line: #6c5e49;
  --line-on-field: rgba(121, 106, 84, 0.28);
  --scrim: rgba(28, 13, 6, 0.62);
  --scrim-soft: rgba(28, 13, 6, 0.22);
  --swatch-blue: #978068;
  --swatch-violet: #9a8167;
  --field: #7e6951;
  --field-deep: #74624d;
  --swatch-lime: #978068;
  --swatch-red: #978068;
}
</style>

<header class="nav">
  <div class="nav__bar">
    <div class="nav__brand">
      <button class="nav__toggle" type="button" aria-expanded="false" aria-controls="nav-panel" aria-label="Open menu">
        <span class="nav__toggle-line"></span>
        <span class="nav__toggle-line"></span>
      </button>
      <a class="nav__home" href="#">
        <svg class="nav__glyph" viewBox="0 0 28 18" width="28" height="18" aria-hidden="true">
          <rect x="0" y="0" width="28" height="18" rx="3" fill="currentColor" />
          <path d="M3 12.5c3-3.2 5.6-3.2 8.2 0s5.4 3.2 8.2 0 5-3.2 5.6-1.2" class="nav__glyph-wave" fill="none" stroke-width="2.2" stroke-linecap="round" />
          <circle class="nav__glyph-sun" cx="20.5" cy="5.5" r="2" />
        </svg>
        <span class="nav__name">Kesto Yard</span>
      </a>
      <a class="nav__region" href="#">
        <svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><circle cx="8" cy="8" r="6.5" fill="none" stroke="currentColor" /><path d="M1.5 8h13M8 1.5c-2.4 2.6-2.4 10.4 0 13M8 1.5c2.4 2.6 2.4 10.4 0 13" fill="none" stroke="currentColor" /></svg>
        <span>NL</span>
      </a>
    </div>

    <nav class="nav__pill" aria-label="Main">
      <a class="nav__link" href="#">Work</a>
      <a class="nav__link" href="#">Services</a>
      <a class="nav__link" href="#">Moorings</a>
      <a class="nav__link" href="#">About</a>
      <a class="nav__link" href="#">Yard</a>
      <a class="nav__link" href="#">Journal</a>
      <a class="nav__link nav__link--icon" href="#" aria-label="Search">
        <svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><circle cx="7" cy="7" r="4.6" fill="none" stroke="currentColor" stroke-width="1.3" /><path d="M10.4 10.4 14 14" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" /></svg>
      </a>
    </nav>

    <a class="nav__talk" href="#">
      <img class="nav__face" src="assets/old-sailor.jpg" alt="Portrait of the yard master" width="24" height="24" />
      <span class="nav__talk-long">Talk to Aurelio</span><span class="nav__talk-short">Talk</span>
    </a>
  </div>

  <div class="nav__panel" id="nav-panel" hidden>
    <a class="nav__panel-link" href="#">Work</a>
    <a class="nav__panel-link" href="#">Services</a>
    <a class="nav__panel-link" href="#">Moorings</a>
    <a class="nav__panel-link" href="#">About</a>
    <a class="nav__panel-link" href="#">Yard</a>
    <a class="nav__panel-link" href="#">Journal</a>
  </div>
</header>

<style>
  .nav {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 0;
    padding: 0 var(--edge);
    font-size: var(--text-s);
    line-height: 1;
  }
  .nav__bar {
    padding-top: 15px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: var(--gap);
  }
  .nav__brand,
  .nav__talk {
    display: flex;
    align-items: center;
    min-height: 40px;
    border-radius: var(--radius);
    background: var(--graphite);
    color: var(--paper);
  }
  .nav__brand {
    justify-self: start;
    padding: 0 var(--space-s);
  }
  .nav__home,
  .nav__region {
    display: flex;
    align-items: center;
    gap: var(--space-s);
    min-height: 44px;
    padding: 0 var(--space-s);
    color: inherit;
    text-decoration: none;
    transition: opacity var(--quick) var(--ease);
  }
  .nav__home {
    font-size: var(--text-m);
  }
  .nav__region {
    gap: 6px;
    margin-left: var(--space-s);
    opacity: 0.85;
  }
  .nav__home:hover,
  .nav__region:hover {
    opacity: 0.7;
  }
  .nav__glyph {
    color: var(--paper);
  }
  .nav__glyph-wave {
    stroke: var(--graphite);
  }
  .nav__glyph-sun {
    fill: var(--graphite);
  }

  .nav__pill {
    display: flex;
    align-items: center;
    padding: 0 var(--space-s);
    border-radius: var(--radius);
    background: var(--mist);
  }
  .nav__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 13px;
    color: var(--ink);
    text-decoration: none;
    transition: color var(--quick) var(--ease);
  }
  .nav__link:hover {
    color: var(--ink-soft);
  }

  .nav__talk {
    justify-self: end;
    gap: var(--space-s);
    min-height: 44px;
    padding: 0 14px 0 8px;
    text-decoration: none;
    transition: background-color var(--quick) var(--ease);
  }
  .nav__talk:hover {
    background: var(--smoke);
  }
  .nav__face {
    width: 24px;
    height: 24px;
    border-radius: 2px;
    object-fit: cover;
    object-position: 50% 30%;
  }
  .nav__talk-short {
    display: none;
  }

  .nav__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .nav__toggle-line {
    display: block;
    height: 1.5px;
    background: var(--paper);
    transition: transform var(--quick) var(--ease);
  }
  .nav.is-open .nav__toggle-line:first-child {
    transform: translateY(3.25px) rotate(45deg);
  }
  .nav.is-open .nav__toggle-line:last-child {
    transform: translateY(-3.25px) rotate(-45deg);
  }

  .nav__panel {
    display: grid;
    margin-top: var(--space-xs);
    padding: var(--space-s);
    border-radius: var(--radius);
    background: var(--graphite);
  }
  .nav__panel[hidden] {
    display: none;
  }
  .nav__panel-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 var(--space-s);
    border-bottom: var(--rule) solid var(--smoke);
    color: var(--paper);
    font-size: var(--text-l);
    letter-spacing: var(--track-sub);
    text-decoration: none;
  }
  .nav__panel-link:last-child {
    border-bottom: 0;
  }

  .nav a:focus-visible,
  .nav button:focus-visible {
    outline: 2px solid var(--swatch-blue);
    outline-offset: 2px;
  }

  @media (max-width: 1100px) {
    .nav__pill {
      display: none;
    }
    .nav__bar {
      grid-template-columns: 1fr auto;
    }
    .nav__toggle {
      display: flex;
    }
  }
  @media (max-width: 560px) {
    .nav__brand {
      padding: 0;
    }
    .nav__region {
      margin-left: 0;
    }
    .nav__talk-long {
      display: none;
    }
    .nav__talk-short {
      display: inline;
    }
  }
  @media (max-width: 400px) {
    .nav__region {
      display: none;
    }
  }
  @media (min-width: 1101px) {
    .nav__panel {
      display: none;
    }
  }
</style>

<script>
  (() => {
    for (const root of document.querySelectorAll('.nav')) {
      const toggle = root.querySelector('.nav__toggle');
      const panel = root.querySelector('.nav__panel');
      if (!toggle || !panel) continue;
      toggle.addEventListener('click', () => {
        const open = !root.classList.contains('is-open');
        root.classList.toggle('is-open', open);
        panel.hidden = !open;
        toggle.setAttribute('aria-expanded', String(open));
        toggle.setAttribute('aria-label', open ? 'Close menu' : 'Open menu');
      });
    }
  })();
</script>

Similar components

Grid top bar

Grid top bar

Pill menu bar

Pill menu bar

Masthead

Masthead

Bar and opening line

Bar and opening line

Floating dock

Floating dock

Floating bar

Floating bar

Ruler bar and pill nav

Ruler bar and pill nav

Word stack

Word stack