WlPageHeader

Page header with breadcrumbs, description, metadata, buttons and navigation. No background surface.
Components / Composites v0.3.0

Change props to see the result: the example and code use the same settings. “Reset” restores the initial values.

Settings

headingLevel
size
density
title

Main page heading.

description

Short page description.

eyebrow

Eyebrow or section context.

Props pt, models, handlers and slots can be edited in the SFC. See their descriptions in API.

Example

Team materials

Working agreements and documentation.
12 materials
Focus: outside the example · pointer: outside the example

Explore the live example and copy its Vue SFC into your application. Settings on the left can be combined.

Code for your application

Vue SFC · current settings
<script setup lang="ts">
import { WlBreadcrumbs, WlButton, WlPageHeader, WlTag } from "legato-ui";
import { ref } from "vue";
const changed = ref(false);
</script>

<template>
  <div class="wl-stack" data-space="md">
    <WlPageHeader
      title="Team materials"
      description="Working agreements and documentation."
      :heading-level="2"
      
    >
      <template #breadcrumbs>
        <WlBreadcrumbs
          :items="[
            { label: 'Team', href: '#ds-components' }, { label: 'Materials' }
          ]"
        />
      </template>
      <template #meta><WlTag>{{ "12 materials" }}</WlTag></template>
      <template #actions><WlButton @click="changed = true">{{ "Add" }}</WlButton></template>
    </WlPageHeader>
    <p v-if="changed" role="status">{{ "Material added." }}</p>
  </div>
</template>

All page header sections

Breadcrumbs, eyebrow/title/description/meta/actions/navigation, three sizes and compact without an extra h1.

Workspace

Team materials

Actions and metadata adapt to the available width.
24 activeUpdated today

View: List. New materials in this example: 0.

Vue SFC · additional example
<script setup lang="ts">
import { WlBreadcrumbs, WlButton, WlCheckbox, WlPageHeader, WlPill, WlSegmented, type WlSizeSm } from "legato-ui";
import { ref } from "vue";
const size = ref<WlSizeSm>("lg");
const compact = ref(false);
const view = ref<"list" | "grid" | null>("list");
const added = ref(0);
</script>

<template>
  <div class="wl-stack" data-space="lg">
    <div class="wl-inline" data-space="sm"><WlButton
      v-for="value in (['sm', 'md', 'lg'] as const)"
      :key="value"
      size="sm"
      :aria-pressed="size === value"
      @click="size = value"
    >{{ value }}</WlButton><WlCheckbox v-model="compact">{{ "Compact header" }}</WlCheckbox></div>
    <WlPageHeader :heading-level="2" :size="size" :density="compact ? 'compact' : 'default'">
      <template #breadcrumbs>
        <WlBreadcrumbs
          :items="[
            { label: 'Legato UI', href: '?' },
            { label: 'Documentation', href: '?view=docs' },
            { label: 'Materials' }
          ]"
        />
      </template>
      <template #eyebrow>{{ "Workspace" }}</template>
      <template #title>{{ "Team materials" }}</template>
      <template #description>{{ "Actions and metadata adapt to the available width." }}</template>
      <template #meta>
        <WlPill tone="info" label="24 active" /><span>{{ "Updated today" }}</span>
      </template>
      <template #actions>
        <WlButton size="sm" variant="primary" @click="added++">{{ "New material" }}</WlButton>
        <WlButton size="sm" disabled>{{ "Export unavailable" }}</WlButton>
      </template>
      <template #navigation>
        <WlSegmented
          v-model="view"
          :options="[
            { label: 'List', value: 'list', icon: 'list' },
            { label: 'Grid', value: 'grid', icon: 'grid' }
          ]"
          aria-label="Material list view"
        />
      </template>
    </WlPageHeader>
    <p class="wl-text-small" role="status">
      {{ "View:" }} {{ view === 'list' ? "List" : "Grid" }}{{
        ". New materials in this example:"
      }} {{ added }}.
    </p>
  </div>
</template>