Site Header and Footer

Native-first, responsive page shell surfaces with sticky, compact, bordered, and centered variants.

Token-aware card

Preview and source are generated from this one example definition.

Documentation rebuild

One source of truth

The rendered preview and copyable markup cannot drift apart.

Customize CSS variables

Changes are scoped to this preview and update immediately.

Controls the inner spacing of this card. --card-padding 32px
Changes the card corner radius. --card-radius 12px
Overrides the card surface color. --card-background var(--surface-default)
No overrides applied.
.example-scope 

The native header is canonical. It composes the existing container, navigation, actions, and layout primitives.

Responsive site header

Narrow the preview to see navigation wrap without losing its semantics.

CSS Tags
DocumentationBuild a clear, resilient interface.

The content starts with deliberate space below the site navigation.

<header class="site-header" data-sticky>
<container>
<a data-site-brand href="/">CSS Tags</a>
<nav data-header-navigation aria-label="Primary">...</nav>
<div data-header-actions>...</div>
</container>
</header>

Equivalent hosts are header.site-header, header[data-site-header], and site-header. A custom host needs role="banner".

  • Sticky: data-sticky, sticky, or .is-sticky
  • Elevated: data-elevated, elevated, or .is-elevated
  • Compact: data-size="compact", compact, or .is-compact

Elevation is opt-in; the default header remains a flat bordered surface.

<footer class="site-footer" data-bordered>
<container>
<div data-footer-grid>...</div>
<div data-footer-meta>...</div>
</container>
</footer>

Equivalent hosts are footer.site-footer, footer[data-site-footer], and site-footer. A custom host needs role="contentinfo".

  • Border: data-bordered, bordered, or .is-bordered
  • Compact: data-size="compact", compact, or .is-compact
  • Centered: data-align="center", centered, or .is-centered

Important tokens

Header customization starts with --site-header-background, --site-header-color, --site-header-border, --site-header-min-height, --site-header-padding-inline, --site-header-gap, and --site-header-actions-gap. At the wrapped breakpoint, --site-header-wrapped-navigation-padding-block-end preserves breathing room beneath the second navigation row.

Footer customization starts with --site-footer-background, --site-footer-color, --site-footer-padding-block, --site-footer-gap, --site-footer-grid-gap, --site-footer-column-min, and --site-footer-meta-border.