Skip to content
Viewership Inquire
Astro UI

Header Centered.

Brand in the middle, links split either side, optional announcement strip. Folds into a details menu.

Site chromeSectionNo dependencies 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 HeaderCentered.astro

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

  3. Use it

    Page.astro
    ---
    import HeaderCentered from "../components/viewership/header-centered/HeaderCentered.astro";
    ---
    
    <HeaderCentered />

Props 8

PropTypeDefaultDescription
brand string · Brand name, set as text unless the logo slot is used.
brandHref string "/" Where the brand links.
left { label: string; href: string }[] · Links left of the brand.
right { label: string; href: string }[] [] Links right of the brand.
announcement string · One line in a strip above the header.
announcementHref string · Makes the announcement a link.
current string · Href of the current page.
slot: logo slot · Replaces the text brand.

Source 1 file

Original, MIT.