C Carbon · 01

Site header

사이트 머리

A near-black 48px strip across the top, with the site name on the left. The current menu item gets lighter text and a white underline, like the header of a work tool.

RuleThe menu opens and closes without scripts, and the topic you are on is announced as the current page to screen readers too.

Also known as: SiteHeaderUI shell
···
usage (Astro)
---
// src/layouts/Base.astro
import { SiteHeader } from '../components/registry';
---
<SiteHeader site={site} nav={nav} />
site.json
// sites/<사이트>/site.json — 적지 않으면 사이트 이름으로 자동으로 고른다
{
  "variants": { "SiteHeader": "bar" }
}
props (TypeScript)
export interface SiteHeaderProps {
  site: SiteConfig;
  /** 주제(카테고리) + 소개. 허브는 소개만 */
  nav: NavLink[];
  variant?: VariantOf<'SiteHeader'>;
}

bar is one row: name on the left, menu on the right, each menu cell as tall as the strip. On a phone, a menu button on the left opens a side menu. stacked adds a grey row under the dark strip for topic tabs; the strip itself carries the name and a one-line intro, and on a phone the tabs slide sideways without folding. compact keeps only an "All menu" button on the right; it opens a dark panel listing each topic with its description and post count.

With four or five short topics, bar is the simplest. With more topics, or when you want descriptions shown, stacked or compact fits better. In every variant this is the darkest surface on a light page, so it can feel heavy on a light, gentle parenting site. In dark mode it is the same colour as the page, set apart only by a thin line below.

The name slot follows Carbon’s "Header name" position; no IBM wordmark or logo is used.

Use it when — Variants 3

  1. barSingle bar When 3–5 topics fit on one line next to the name. On phones the menu folds open.Used by 3: babyplay, babysick, feeding
  2. stackedTwo rows When topic tabs should always be visible — on phones they scroll sideways instead of folding.Used by 4: babyfood, toddlerfood, vaccination, 허브
  3. compactFull menu When there are many topics, or each topic deserves a one-line description and post count.Used by 4: babysleep, birthprep, milestone, newborn
Open as page ↗

Suggest an entry

Tell us about a missing component or variant, or something a pack should fix. We read every suggestion.