Headers
Navigation that wraps gracefully and lets native HTML do the work.
Left logo, right menu
A familiar horizontal header with the brand at the start and navigation aligned to the end.
Menu
View HTML / PlaygroundHTML source
<header class="sl-header">
<div class="sl-header__row">
<a class="sl-header__brand" href="/" aria-label="StyloftCSS home"
><img
src="/_astro/brand-mark.wnBYXhuR_ZzqzRW.webp"
alt=""
width="32"
height="32"
/><span>Styloft<span>CSS</span></span></a
>
<nav class="sl-header__menu" aria-label="Left-logo example navigation">
<a href="/components/">Components</a><a href="/layouts/">Layouts</a
><a href="/themes/">Themes</a>
</nav>
<details class="sl-header__mobile">
<summary>Menu <span aria-hidden="true">☰</span></summary>
<nav
class="sl-header__mobile-nav"
aria-label="Left-logo example navigation mobile navigation"
>
<a href="/components/">Components</a><a href="/layouts/">Layouts</a
><a href="/themes/">Themes</a>
</nav>
</details>
</div>
</header>Right logo, left menu
The navigation comes first, with the logo aligned to the right on wide layouts.
Menu
View HTML / PlaygroundHTML source
<header class="sl-header sl-header--reverse">
<div class="sl-header__row">
<nav class="sl-header__menu" aria-label="Right-logo example navigation">
<a href="/components/">Components</a><a href="/layouts/">Layouts</a
><a href="/themes/">Themes</a>
</nav>
<a class="sl-header__brand" href="/" aria-label="StyloftCSS home"
><img
src="/_astro/brand-mark.wnBYXhuR_ZzqzRW.webp"
alt=""
width="32"
height="32"
/><span>Styloft<span>CSS</span></span></a
>
<details class="sl-header__mobile">
<summary>Menu <span aria-hidden="true">☰</span></summary>
<nav
class="sl-header__mobile-nav"
aria-label="Right-logo example navigation mobile navigation"
>
<a href="/components/">Components</a><a href="/layouts/">Layouts</a
><a href="/themes/">Themes</a>
</nav>
</details>
</div>
</header>Center logo, menus on both sides
Equal-width side columns keep the logo truly centered. Narrow containers combine both menus into a native Menu disclosure.
Menu
View HTML / PlaygroundHTML source
<header class="sl-header sl-header--center">
<div class="sl-header__row">
<a class="sl-header__brand" href="/" aria-label="StyloftCSS home"
><img
src="/_astro/brand-mark.wnBYXhuR_ZzqzRW.webp"
alt=""
width="32"
height="32"
/><span>Styloft<span>CSS</span></span></a
>
<nav
class="sl-header__menu sl-header__menu--start"
aria-label="Centered example primary navigation"
>
<a href="/components/">Components</a><a href="/layouts/">Layouts</a>
</nav>
<nav
class="sl-header__menu sl-header__menu--end"
aria-label="Centered example secondary navigation"
>
<a href="/themes/">Themes</a><a href="/getting-started/">Documentation</a>
</nav>
<details class="sl-header__mobile">
<summary>Menu <span aria-hidden="true">☰</span></summary>
<nav
class="sl-header__mobile-nav"
aria-label="Centered example primary navigation mobile navigation"
>
<a href="/components/">Components</a><a href="/layouts/">Layouts</a
><a href="/themes/">Themes</a><a href="/getting-started/">Documentation</a>
</nav>
</details>
</div>
</header>Left logo, right menu and CTA
Navigation and a prominent action share the right side. The action is a normal link to the getting-started guide.
Menu
View HTML / PlaygroundHTML source
<header class="sl-header">
<div class="sl-header__row">
<a class="sl-header__brand" href="/" aria-label="StyloftCSS home"
><img
src="/_astro/brand-mark.wnBYXhuR_ZzqzRW.webp"
alt=""
width="32"
height="32"
/><span>Styloft<span>CSS</span></span></a
>
<nav class="sl-header__menu" aria-label="CTA example navigation">
<a href="/components/">Components</a><a href="/layouts/">Layouts</a
><a href="/themes/">Themes</a
><a class="sl-btn sl-hover-sheen" href="/getting-started/">Start building ↗</a>
</nav>
<details class="sl-header__mobile">
<summary>Menu <span aria-hidden="true">☰</span></summary>
<nav
class="sl-header__mobile-nav"
aria-label="CTA example navigation mobile navigation"
>
<a href="/components/">Components</a><a href="/layouts/">Layouts</a
><a href="/themes/">Themes</a
><a class="sl-btn sl-hover-sheen" href="/getting-started/">Start building ↗</a>
</nav>
</details>
</div>
</header>Top information bar with navigation header
A utility bar adds release information and useful links above the logo, main menu, and CTA.
StyloftCSS · CSS only, made for your next idea.
Menu
View HTML / PlaygroundHTML source
<header class="sl-header">
<div class="sl-header__top">
<p>StyloftCSS · CSS only, made for your next idea.</p>
<nav aria-label="Information bar links">
<a href="/getting-started/">Quick start</a
><a href="/components/">Browse examples</a>
</nav>
</div>
<div class="sl-header__row">
<a class="sl-header__brand" href="/" aria-label="StyloftCSS home"
><img
src="/_astro/brand-mark.wnBYXhuR_ZzqzRW.webp"
alt=""
width="32"
height="32"
/><span>Styloft<span>CSS</span></span></a
>
<nav class="sl-header__menu" aria-label="Information-bar example main navigation">
<a href="/components/">Components</a><a href="/layouts/">Layouts</a
><a href="/themes/">Themes</a
><a class="sl-btn sl-hover-sheen" href="/getting-started/">Get started ↗</a>
</nav>
<details class="sl-header__mobile">
<summary>Menu <span aria-hidden="true">☰</span></summary>
<nav
class="sl-header__mobile-nav"
aria-label="Mobile info navigation mobile navigation"
>
<a href="/components/">Components</a><a href="/layouts/">Layouts</a
><a href="/themes/">Themes</a
><a class="sl-btn" href="/getting-started/">Get started ↗</a>
</nav>
</details>
</div>
</header>A simple site header
View HTML / PlaygroundHTML source
<header class="demo-header sl-cluster sl-justify-between sl-gap-6">
<a class="demo-wordmark" href="/">Studio<span>®</span></a>
<nav class="sl-cluster sl-gap-6" aria-label="Studio example navigation">
<a href="/components/cards/">Work</a><a href="/getting-started/">About</a>
<a class="sl-btn" href="/getting-started/">Let's build ↗</a>
</nav>
</header>Native disclosure navigation
A disclosure menu that opens with pointer or keyboard, without a script.
View HTML / PlaygroundHTML source
<header class="demo-header sl-cluster sl-justify-between">
<a class="demo-wordmark" href="/">Notebook.</a>
<details class="demo-menu">
<summary>Explore the site</summary>
<nav class="sl-stack" aria-label="Notebook example navigation">
<a href="/components/">Components</a>
<a href="/layouts/">Layout patterns</a>
<a href="/themes/">Theme gallery</a>
</nav>
</details>
</header>Navigation with a primary action
View HTML / PlaygroundHTML source
<header class="sl-nav">
<a href="/" class="demo-wordmark">Orbit.</a>
<nav class="sl-cluster" aria-label="Orbit example">
<a href="/components/">Components</a><a href="/themes/">Themes</a
><a class="sl-btn sl-btn--sm sl-hover-sheen" href="/getting-started/"
>Get started
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
aria-hidden="true"
>
<path d="M5 12h14m-6-6 6 6-6 6" /></svg
></a>
</nav>
</header>Two-level announcement header
A new foundation for your next idea. Read the guide →
View HTML / PlaygroundHTML source
<div class="sl-stack sl-gap-0">
<p class="sl-alert sl-text-center">
A new foundation for your next idea.
<a href="/getting-started/">Read the guide →</a>
</p>
<header class="sl-nav">
<a href="/" class="demo-wordmark">Fieldnotes.</a>
<nav class="sl-cluster" aria-label="Fieldnotes example">
<a href="/components/cards/">Stories</a><a href="/layouts/">Collections</a>
</nav>
</header>
</div>Centered brand navigation
View HTML / PlaygroundHTML source
<header class="sl-nav sl-column sl-gap-6">
<a href="/" class="demo-wordmark">The Notebook</a>
<nav class="sl-cluster sl-justify-center" aria-label="Centered example">
<a class="sl-link sl-link--underline" href="/components/">Library</a
><a class="sl-link sl-link--underline" href="/layouts/">Layouts</a
><a class="sl-link sl-link--underline" href="/themes/">Themes</a>
</nav>
</header>Compact documentation header
Browse documentation
View HTML / PlaygroundHTML source
<header class="sl-nav">
<a href="/getting-started/" class="demo-wordmark"
>Docs<span class="sl-badge">0.1</span></a
>
<details class="sl-details">
<summary>Browse documentation</summary>
<nav class="sl-stack" aria-label="Compact docs example">
<a href="/getting-started/">Getting started</a
><a href="/components/">All components</a><a href="/themes/">Tokens & themes</a>
</nav>
</details>
</header>Classes beginning with sl- come from StyloftCSS. Examples with demo- classes also use our optional demo extension CSS ↓. Load it after the core to reproduce those details.