Skip to content
Viewership Inquire
Website Components

Header Glass.

Floating header with the links in a frosted-glass pill, made to sit over a full-bleed hero image. No JavaScript.

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 HeaderGlass.astro

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

  3. Use it

    Page.astro
    ---
    import HeaderGlass from "../components/viewership/header-glass/HeaderGlass.astro";
    ---
    
    <HeaderGlass />

Props 9

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 }[] · Links inside the glass pill.
secondary { label: string; href: string } · Quiet text link before the CTA, such as Log in.
cta { label: string; href: string } · Solid button on the right.
current string · Href of the current page (sets aria-current).
overlay boolean false Position absolutely over the top of the parent, for use over a hero image.
tone "default" | "inverse" "default" Use inverse for light text and white glass over dark media.
slot: logo slot · Replaces the text brand.

Source 1 file

Original, MIT.