WlPageHeader
Content
Team materials
Full example
<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>Size and density
Team materials
Full example
<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.
Team materials
View: List. New materials in this example: 0.
Full 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>Props
Types, accepted values and literal defaults come from the public manifest. Inherited settings name their source; “Not set” means no default is declared.
| Prop | Type / values | Default | Purpose |
|---|---|---|---|
title | string | "" | Main page heading. |
description | string | "" | Short page description. |
eyebrow | string | "" | Eyebrow or section context. |
headingLevel | 1 | | 1 | — |
size | WlSizeSm | "lg" | — |
density | WlDensity | "default" | — |
pt | WlPt< | Not set | Attributes and callbacks for the component's documented pass-through sections. |
Events
No public events.
Slots
| Slot | Type / values | Content |
|---|---|---|
breadcrumbs | — | Breadcrumb path above the heading. |
eyebrow | — | Custom eyebrow. |
title | — | Custom heading content. |
description | — | Extended page description. |
meta | — | Statuses, dates and other metadata. |
actions | — | Primary and secondary page actions. |
navigation | — | Tabs or a mode control below the heading. |
Pass-through: pt
Sections WlPageHeader are listed below. Attributes merge in this order: createWlPt() WlConfig.ptpt instance. Class and style merge; the last supplied value takes priority for other attributes.
| Section | DOM | Purpose |
|---|---|---|
root | header.wl-page-header | Main element of the component. |
breadcrumbs | div.wl-page-header__breadcrumbs | Breadcrumbs area above the page heading. |
main | div.wl-page-header__main | Main page-heading row. |
content | div.wl-page-header__content | Main content area. |
eyebrow | div.wl-page-header__eyebrow | Short category or context above the title. |
title | h1 / h2.wl-page-header__title | Visible component heading. |
description | div.wl-page-header__description | Supporting text below the page title. |
meta | div.wl-page-header__meta | Supplementary page information. |
actions | div.wl-page-header__actions | Area for the component actions. |
navigation | div.wl-page-header__navigation | Page-level navigation below the heading. |
Sections refer to the component DOM. Dotted names identify a configuration group and its section; composite parts use their own pt groups. Global and local attributes merge, with class and style added together.
Keyboard and accessibility
- Choose headingLevel for the page structure: documentation uses 2 within the page, while a standalone page may use 1.
- Actions and navigation slots must contain accessible buttons/links with clear names.
- Breadcrumbs, context, heading and description retain meaning in order on narrow screens; do not replace important text with a coloured badge alone.
Keyboard and application responsibilities
Provide a meaningful accessible name and connect labels, hints and errors to the focusable element. Check the behavior with your own data and a screen reader.
WAI-ARIA Authoring PracticesIn your application, check keyboard controls, zoom and focus visibility. State labels and required information must be readable in every theme.