S shadcn · 01

Site header

사이트 머리

White bar with a single thin line underneath. Menu text is light gray and only the current topic turns black.

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: SiteHeaderNavigationMenuTabs
···
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'>;
}

All three variants use only white and thin lines, with no boxes or color bands. bar puts a black rounded mark and the name on the left and the menu text on the right in one line. stacked adds a light gray one-line tagline next to the name, and the topics sit in a row below as tabs inside a light gray pill; the current topic is a white pill that looks lifted. compact keeps just the name on the left and one outlined “All menu” button at the far right; it opens to a list with each topic’s name and description.

With few, short topics bar is the quietest. Pick stacked when you want topic tabs always visible, and compact when there are many topics. It is only white and thin lines, so it suits text-first sites better than colorful ones.

The menu text follows the original size and weight, and even the floating panel uses only a border with no shadow. Shadows are reserved for cards.

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.