kitbash Sign in Connect agent
Components

Ticker and nav bar

A lime ticker strip above a dark bar with the wordmark, nav links that grow blinking brackets, a waitlist link and two outlined square icon buttons; under 760 px the links fold into a Menu panel.

Part of the style

Lime Field Mono

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

Preview

Code
<style>
/* Goes after the pack's base.css */
:root {
  --lime: #03141c;
  --night: #ffffff;
  --void: #ffffff;
  --fog: #000d16;
  --lime-dim: rgba(3, 20, 28, 0.55);
  --shade: rgba(255, 255, 255, 0.18);
  --pic-steel: #37464d;
  --pic-olive: #59869c;
  --pic-mustard: #91d9fd;
  --orb: #639699;
  --pic-ember: #7aadb0;
  --orb-deep: #6b8385;
  --pic-clay: #92b0b1;
  --pic-magenta: #669499;
  --pic-violet: #6e898c;
}
</style>

<header class="masthead">
  <a class="masthead__ticker" href="#" aria-label="Join the presale list">
    <span class="masthead__track" aria-hidden="true">
      <span class="masthead__tick">Join The Presale List</span>
      <span class="masthead__tick">Join The Presale List</span>
      <span class="masthead__tick">Join The Presale List</span>
      <span class="masthead__tick">Join The Presale List</span>
      <span class="masthead__tick">Join The Presale List</span>
      <span class="masthead__tick">Join The Presale List</span>
    </span>
  </a>
  <div class="masthead__bar">
    <button class="masthead__menu" type="button" aria-expanded="false">
      <span class="masthead__burger" aria-hidden="true">=</span> Menu
    </button>
    <nav class="masthead__nav" aria-label="Main">
      <a class="masthead__brand" href="#">Low Orbit<sup>™</sup> Sound &amp; Light</a>
      <a class="masthead__link" href="#"><span>Programme</span></a>
      <a class="masthead__link" href="#"><span>Passes</span></a>
      <a class="masthead__link" href="#"><span>Info</span></a>
      <a class="masthead__link" href="#"><span>Camping</span></a>
      <a class="masthead__link" href="#"><span>Caring for Country</span></a>
    </nav>
    <div class="masthead__end">
      <a class="masthead__wait" href="#">Join The Waitlist</a>
      <button class="masthead__icon" type="button" aria-label="Search">
        <svg viewBox="0 0 20 20" aria-hidden="true"><rect x="0.5" y="0.5" width="19" height="19" /><circle cx="9" cy="9" r="4" /><path d="M12 12l3.5 3.5" /></svg>
      </button>
      <button class="masthead__icon" type="button" aria-label="Saved sets">
        <svg viewBox="0 0 20 20" aria-hidden="true"><rect x="0.5" y="0.5" width="19" height="19" /><path d="M6.5 4.5h7v11l-3.5-3-3.5 3z" /></svg>
      </button>
    </div>
  </div>
</header>

<style>
  .masthead {
    position: relative;
    z-index: 5;
    background: var(--night);
    color: var(--lime);
    font-size: var(--text-s);
  }
  .masthead__ticker {
    display: block;
    overflow: hidden;
    height: var(--bar);
    min-height: var(--tap);
    background: var(--lime);
    color: var(--night);
    text-decoration: none;
  }
  .masthead__track {
    display: flex;
    width: max-content;
    height: 100%;
    align-items: center;
    animation: masthead-roll var(--ticker-time) linear infinite;
  }
  .masthead__ticker:hover .masthead__track,
  .masthead.is-resting .masthead__track {
    animation-play-state: paused;
  }
  .masthead__tick {
    flex: none;
    padding-right: clamp(64px, 9vw, 120px);
    white-space: nowrap;
  }
  .masthead__ticker:focus-visible {
    outline: var(--rule) solid var(--night);
    outline-offset: -4px;
  }
  @keyframes masthead-roll {
    to { transform: translateX(-50%); }
  }

  .masthead__bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-m);
    padding: 0 var(--edge);
    border-bottom: var(--rule) solid var(--lime);
  }
  .masthead__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: clamp(12px, 1.7vw, 26px);
    min-width: 0;
  }
  .masthead__brand,
  .masthead__link,
  .masthead__wait {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
  }
  .masthead__link {
    min-width: var(--tap);
    justify-content: center;
  }
  .masthead__brand sup {
    margin-right: 1ch;
    font-size: 0.6em;
  }
  .masthead__link span::before,
  .masthead__link span::after {
    display: inline-block;
    width: 0;
    overflow: hidden;
    vertical-align: bottom;
    transition: width var(--quick) var(--ease);
  }
  .masthead__link span::before { content: "["; }
  .masthead__link span::after { content: "]"; }
  .masthead__link:hover span::before,
  .masthead__link:hover span::after,
  .masthead__link:focus-visible span::before,
  .masthead__link:focus-visible span::after {
    width: 1ch;
    animation: masthead-blink var(--blink-time) steps(1) infinite;
  }
  @keyframes masthead-blink {
    50% { opacity: 0; }
  }
  .masthead__link:focus-visible,
  .masthead__brand:focus-visible,
  .masthead__wait:focus-visible,
  .masthead__menu:focus-visible,
  .masthead__icon:focus-visible {
    outline: var(--rule) solid var(--lime);
    outline-offset: 2px;
  }

  .masthead__end {
    display: flex;
    align-items: center;
    margin-left: auto;
  }
  .masthead__wait {
    margin-right: var(--space-s);
  }
  .masthead__wait::after {
    content: "_";
    animation: masthead-blink var(--blink-time) steps(1) infinite;
  }
  .masthead.is-resting .masthead__wait::after {
    animation-play-state: paused;
  }
  .masthead__icon {
    display: grid;
    place-items: center;
    width: var(--tap);
    height: var(--tap);
    margin-right: calc(var(--space-s) * -1);
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
  }
  .masthead__icon + .masthead__icon {
    margin-left: calc(var(--space-s) * -1.5);
  }
  .masthead__icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    transition: transform var(--quick) var(--ease);
  }
  .masthead__icon:hover svg {
    transform: scale(1.12);
  }

  .masthead__menu {
    display: none;
    align-items: center;
    gap: var(--space-s);
    min-height: var(--tap);
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
  }

  @media (max-width: 1020px) {
    .masthead__menu {
      display: inline-flex;
    }
    .masthead__nav {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      flex-direction: column;
      align-items: stretch;
      padding: var(--space-s) var(--edge) var(--space-l);
      background: var(--night);
      border-bottom: var(--rule) solid var(--lime);
      font-size: var(--text-m);
      opacity: 0;
      visibility: hidden;
      transform: translateY(-8px);
      transition: opacity var(--quick) var(--ease), transform var(--quick) var(--ease), visibility 0s linear var(--quick);
    }
    .masthead.is-open .masthead__nav {
      opacity: 1;
      visibility: visible;
      transform: none;
      transition-delay: 0s;
    }
    .masthead__brand,
    .masthead__link {
      border-bottom: var(--rule) solid var(--lime-dim);
    }
  }
  @media (max-width: 420px) {
    .masthead__wait {
      font-size: var(--text-xs);
    }
  }
  @media (max-width: 370px) {
    .masthead__wait {
      display: none;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .masthead__track,
    .masthead__wait::after,
    .masthead__link span::before,
    .masthead__link span::after {
      animation: none !important;
    }
  }
</style>

<script>
  (() => {
    document.querySelectorAll(".masthead").forEach((root) => {
      const menu = root.querySelector(".masthead__menu");
      menu.addEventListener("click", () => {
        const open = root.classList.toggle("is-open");
        menu.setAttribute("aria-expanded", String(open));
      });
      new IntersectionObserver(([entry]) => {
        root.classList.toggle("is-resting", !entry.isIntersecting);
      }).observe(root);
    });
  })();
</script>

Similar components

Bottom bar

Bottom bar

Floating pill nav

Floating pill nav

Dark top bar

Dark top bar

Corner masthead

Corner masthead

Stacked header

Stacked header

Cell header

Cell header

Masthead

Masthead

Hairline cell nav

Hairline cell nav