Skip to content
v1.4.2
Fit

Page Header ​

The standard top-of-page block: an optional breadcrumb, a title with optional eyebrow, icon, back button, and description, trailing actions, and a tab row pinned to the bottom edge. surface (card background with a divider) or plain, and optionally sticky.

bash
jlds add page-header

Usage ​

Compose it from other JLDS pieces — Breadcrumb above, Buttons in actions.

html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jarooda/jlds@main/registry/css/index.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jarooda/jlds@main/registry/css/page-header.css">

<header class="jl-pageheader jl-pageheader--surface">
  <div class="jl-pageheader__crumb"><!-- breadcrumb --></div>
  <div class="jl-pageheader__bar">
    <span class="jl-pageheader__icon"><!-- icon svg --></span>
    <div class="jl-pageheader__heading">
      <div class="jl-pageheader__eyebrow">Workspace</div>
      <div class="jl-pageheader__titlerow"><h1 class="jl-pageheader__title">Acme App</h1></div>
      <p class="jl-pageheader__desc">Manage your project settings.</p>
    </div>
    <div class="jl-pageheader__actions"><!-- buttons --></div>
  </div>
</header>
vue
<script setup lang="ts">
import { PageHeader } from "@/components/ui/page-header"
import { Button } from "@/components/ui/button"
</script>

<template>
  <PageHeader title="Acme App" eyebrow="Workspace"
    description="Manage your project settings.">
    <template #breadcrumb><!-- breadcrumb --></template>
    <template #icon><LayersIcon /></template>
    <template #actions>
      <Button variant="ghost">Share</Button>
      <Button variant="primary">New deploy</Button>
    </template>
  </PageHeader>
</template>
tsx
import { PageHeader } from "@/components/ui/page-header"
import { Button } from "@/components/ui/button"

<PageHeader
  title="Acme App"
  eyebrow="Workspace"
  description="Manage your project settings."
  icon={<LayersIcon />}
  breadcrumb={/* … */}
  actions={<><Button variant="ghost">Share</Button><Button variant="primary">New deploy</Button></>}
/>

With back button and tabs ​

Pass a back button (onBack in React, the back prop in Vue / a .jl-pageheader__back in HTML) and a tabs row that pins flush to the bottom edge.

html
<header class="jl-pageheader jl-pageheader--surface">
  <div class="jl-pageheader__bar">
    <div class="jl-pageheader__lead">
      <button type="button" class="jl-pageheader__back" aria-label="Go back"><!-- arrow svg --></button>
    </div>
    <div class="jl-pageheader__heading">
      <div class="jl-pageheader__titlerow"><h1 class="jl-pageheader__title">Billing</h1></div>
    </div>
  </div>
  <div class="jl-pageheader__tabs"><!-- .jl-tabs … --></div>
</header>
vue
<template>
  <PageHeader title="Billing" back sticky @back="goBack">
    <template #tabs><Tabs … /></template>
  </PageHeader>
</template>
tsx
<PageHeader title="Billing" sticky onBack={goBack} tabs={<Tabs … />} />

Props ​

React ​

PageHeader extends React.HTMLAttributes<HTMLElement>.

PropTypeDefaultDescription
titleReact.ReactNode—Main heading
descriptionReact.ReactNode—Subtitle paragraph
eyebrowReact.ReactNode—Small uppercase label above the title
iconReact.ReactNode—Leading icon tile
breadcrumbReact.ReactNode—Breadcrumb row above the bar
actionsReact.ReactNode—Trailing action buttons
tabsReact.ReactNode—Tab row pinned to the bottom edge
leadingReact.ReactNode—Extra content before the heading
onBack() => void—Renders a back button when provided
stickybooleanfalseStick to the top with a blur backdrop
variant"surface" | "plain""surface"Card background or transparent
asReact.ElementType"header"Root element tag

Vue ​

Same layout. title, description, eyebrow are string props (or same-named slots); breadcrumb, icon, actions, tabs, leading are slots. Set the back prop to show the back button and listen with @back. The default slot adds content into the title row.

CSS classes (HTML) ​

ClassPurpose
.jl-pageheader + --surface / --plain / --stickyRoot and variants
.jl-pageheader__crumbBreadcrumb row
.jl-pageheader__barThe main title/actions row
.jl-pageheader__lead / __backLeading slot and back button
.jl-pageheader__iconLeading icon tile
.jl-pageheader__heading / __eyebrow / __titlerow / __title / __descHeading block parts
.jl-pageheader__actionsTrailing actions
.jl-pageheader__tabsBottom-pinned tab row