---
title: "Blog Header"
description: "Introduces a blog with its title and editorial description - actions (subscribe, RSS), category chips, centered or on a banner."
slug: "blog-header"
---

import { DocPage, PageHeader, SkillPanel, SourceFiles, DocLink, SkillField, SkillText, SkillRow, ApiPill } from "../../lib/components/index";

<DocPage meta={meta}>

<PageHeader slug="blog-header" title="Blog Header" component="blog-header">
  Introduces a blog with its title and editorial description - actions (subscribe, RSS), category chips, centered or on a banner. Part of the <DocLink href="website-blog.html">Blog</DocLink> blocks.
</PageHeader>

<SkillPanel component="blog-header">
  <SkillField label="Native basis">
<SkillText>A <code>&lt;header&gt;</code> with the title (<code>h1</code>), an editorial description, optional actions (Buttons - subscribe, RSS) and a <code>&lt;nav&gt;</code> of category links; <code>aria-current</code> marks the current category. Each category is a real URL - no filter script.</SkillText>
  </SkillField>

  <SkillField label="Built from">
<SkillText><DocLink href="button.html">Button</DocLink>, <DocLink href="input.html">Input</DocLink>, <DocLink href="toggle-group.html">Toggle Group</DocLink>, <DocLink href="select.html">Select</DocLink>.</SkillText>
  </SkillField>

  <SkillField label="Web Platform APIs">
<SkillRow>
    <ApiPill href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current" title="the current category"><code>aria-current</code></ApiPill>
    <ApiPill href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment/Container_queries" title="the title scales"><code>Container queries</code></ApiPill>
    <ApiPill href="https://developer.mozilla.org/en-US/docs/Web/CSS/color-mix" title="the banner glow"><code>color-mix()</code></ApiPill>
  </SkillRow>
  </SkillField>

  <SkillField label="Classes">
<SkillRow>
    <code>.mk-blog-header</code>
    <code>.mk-blog-header-copy</code>
    <code>.mk-blog-header-eyebrow</code>
    <code>.mk-blog-header-title</code>
    <code>.mk-blog-header-desc</code>
    <code>.mk-blog-header-actions</code>
    <code>.mk-blog-header-categories</code>
    <code>.mk-blog-header-count</code>
    <code>.mk-blog-header-toolbar</code>
    <code>.mk-blog-header-subscribe</code>
    <code>.mk-blog-header-media</code>
  </SkillRow>
  </SkillField>

  <SkillField label="Data attributes">
<SkillText><code>data-align="center"</code>, <code>data-variant="banner"</code>; <code>aria-current</code> on the current category; <code>data-variant</code> (<code>split</code>, <code>editorial</code>); <code>.mk-blog-header-media</code>, <code>.mk-blog-header-subscribe</code>, <code>.mk-blog-header-toolbar</code>, <code>.mk-blog-header-count</code>.</SkillText>
  </SkillField>
</SkillPanel>

```html example label="Default" hint="Eyebrow, title, description, subscribe + RSS actions and the categories - the current one filled (aria-current)." previewStyle="align-items:stretch;"
<header class="mk-blog-header">
  <div class="mk-blog-header-copy">
    <span class="mk-blog-header-eyebrow">The Acme Blog</span>
    <h1 class="mk-blog-header-title">Notes on building calm software</h1>
    <p class="mk-blog-header-desc"
      >Essays on product, engineering and design from the team behind Acme - one post a week, no hot takes.</p
    >
  </div>
  <div class="mk-blog-header-actions">
    <a class="btn" data-size="sm" href="#"><i data-lucide="mail"></i> Subscribe</a>
    <a class="btn" data-variant="outline" data-size="sm" href="#" type="application/rss+xml"
      ><i data-lucide="rss"></i> RSS</a
    >
  </div>
  <nav class="mk-blog-header-categories" aria-label="Categories">
    <a href="#" aria-current="page">All posts</a>
    <a href="#">Engineering</a>
    <a href="#">Design</a>
    <a href="#">Product</a>
    <a href="#">Company</a>
  </nav>
</header>
```

```html example label="Centered banner" hint="data-variant='banner' with data-align='center': the header on a muted surface with a soft primary glow." previewStyle="align-items:stretch;"
<header class="mk-blog-header" data-variant="banner" data-align="center">
  <div class="mk-blog-header-copy">
    <span class="mk-blog-header-eyebrow">Engineering</span>
    <h1 class="mk-blog-header-title">How we build Acme</h1>
    <p class="mk-blog-header-desc">Architecture notes, post-mortems and the tools we wrote along the way.</p>
  </div>
  <nav class="mk-blog-header-categories" aria-label="Categories">
    <a href="#">All posts</a>
    <a href="#" aria-current="page">Engineering</a>
    <a href="#">Design</a>
    <a href="#">Product</a>
  </nav>
</header>
```

```html example label="Split with subscribe" hint="data-variant='split': the copy beside a featured image; an inline subscribe form (Input + Button) replaces the actions. Narrow the demo and the image moves under the copy." previewStyle="align-items:stretch;"
<header class="mk-blog-header" data-variant="split">
  <div class="mk-blog-header-copy">
    <span class="mk-blog-header-eyebrow">The Acme Blog</span>
    <h1 class="mk-blog-header-title">Notes on building calm software</h1>
    <p class="mk-blog-header-desc"
      >One essay a week on product, engineering and design. No hot takes, no growth hacks.</p
    >
    <form class="mk-blog-header-subscribe" aria-label="Subscribe">
      <input
        class="input"
        type="email"
        name="email"
        placeholder="you@company.com"
        autocomplete="email"
        required
        aria-label="Email"
      />
      <button class="btn" type="submit">Subscribe</button>
    </form>
  </div>
  <figure class="mk-blog-header-media"><img src="images/mk-wide3.png" alt="The Acme team writing together" /></figure>
</header>
```

```html example label="Search, view and sort" hint="A toolbar row under the categories: a search Input, a Toggle Group for the view and a Select for the order. The chips carry counts." previewStyle="align-items:stretch;"
<header class="mk-blog-header">
  <div class="mk-blog-header-copy">
    <h1 class="mk-blog-header-title">All posts</h1>
  </div>
  <nav class="mk-blog-header-categories" aria-label="Categories">
    <a href="#" aria-current="page">All <span class="mk-blog-header-count">128</span></a>
    <a href="#">Engineering <span class="mk-blog-header-count">54</span></a>
    <a href="#">Design <span class="mk-blog-header-count">31</span></a>
    <a href="#">Product <span class="mk-blog-header-count">28</span></a>
    <a href="#">Company <span class="mk-blog-header-count">15</span></a>
  </nav>
  <div class="mk-blog-header-toolbar">
    <input class="input" type="search" placeholder="Search posts…" aria-label="Search posts" style="max-width: 18rem" />
    <div class="flex items-center gap-2">
      <div class="toggle-group" role="group" aria-label="View" data-type="single" data-size="sm">
        <button class="toggle" aria-pressed="true" value="grid" aria-label="Grid"
          ><i data-lucide="layout-grid"></i
        ></button>
        <button class="toggle" aria-pressed="false" value="list" aria-label="List"><i data-lucide="list"></i></button>
      </div>
      <select class="select" data-size="sm" aria-label="Sort posts"
        ><option>Newest</option
        ><option>Most read</option
        ><option>Oldest</option></select
      >
    </div>
  </div>
</header>
```

```html example label="Editorial" hint="data-variant='editorial': a serif italic masthead between ornaments, the categories as underlined text - a magazine." previewStyle="align-items:stretch;"
<header class="mk-blog-header" data-variant="editorial">
  <div class="mk-blog-header-copy">
    <span class="mk-blog-header-eyebrow">Est. 2016</span>
    <h1 class="mk-blog-header-title">The Quiet Quarterly</h1>
    <p class="mk-blog-header-desc">Long reads on work, tools and attention.</p>
  </div>
  <nav class="mk-blog-header-categories" aria-label="Sections">
    <a href="#" aria-current="page">Essays</a>
    <a href="#">Interviews</a>
    <a href="#">Field notes</a>
    <a href="#">Letters</a>
  </nav>
</header>
```

<SourceFiles component="blog-header" section="css" />

</DocPage>
