Skip to content
Viewership Inquire
Website Components

Header Bar.

Brand left, links and a call to action right. Folds into a native details menu when narrow. No JavaScript.

Site chromeSection1 dependency Original, MIT

.md
Style

Using Claude Code? Give it the agent prompt and skip these steps.

  1. Import the foundation once

    foundation.css holds the tokens every component reads.

    Layout.astro
    ---
    // src/layouts/Layout.astro
    import "../styles/foundation.css";
    ---
  2. Copy HeaderBar.astro

    Paste into src/components/viewership/header-bar/

  3. Copy its dependencies

    Each in its own folder, next to this one.

  4. Use it

    Page.astro
    ---
    import HeaderBar from "../components/viewership/header-bar/HeaderBar.astro";
    ---
    
    <HeaderBar />

Props 7

PropTypeDefaultDescription
brand string · Brand name, set as text unless the logo slot is used.
brandHref string "/" Where the brand links.
links { label: string; href: string }[] · Main navigation.
cta { label: string; href: string } · Button at the end of the nav.
current string · Href of the current page (sets aria-current).
sticky boolean false Stick to the top while scrolling.
slot: logo slot · Replaces the text brand.

Source 1 file

Original, MIT.