Page
Page chrome: Breadcrumbs for the trail, PageHeader for the title/description/actions, and PageContent for the padded, width-capped page body. They compose with the layout primitives and are unconcerned with your router — Breadcrumbs renders real anchors and exposes an item slot for router links.
vue
<script setup lang="ts">
import { Breadcrumbs, PageContent, PageHeader } from '@myghf/ui'
</script>
<template>
<PageContent>
<PageHeader title="Patients" description="All records">
<template #breadcrumbs>
<Breadcrumbs :items="[{ label: 'Patients' }]" />
</template>
<template #actions><Button>New</Button></template>
</PageHeader>
</PageContent>
</template>Amina Farouk
Patient record
Page content goes here.
vue
<script setup lang="ts">
import { Breadcrumbs, Button, PageContent, PageHeader } from '@myghf/ui'
const items = [{ label: 'Patients', href: '#' }, { label: 'Amina Farouk' }]
</script>
<template>
<div class="rounded-lg border border-border bg-surface">
<PageContent size="md">
<PageHeader title="Amina Farouk" description="Patient record">
<template #breadcrumbs>
<Breadcrumbs :items="items" />
</template>
<template #actions>
<Button size="sm">Edit</Button>
</template>
</PageHeader>
<p class="mt-6 text-sm text-muted">Page content goes here.</p>
</PageContent>
</div>
</template>Breadcrumbs
| Prop | Type | Default | Description |
|---|---|---|---|
items | BreadcrumbItem[] | [] | The trail. The last item is the current page. |
label | string | 'Breadcrumb' | Accessible name for the nav landmark. |
ts
interface BreadcrumbItem {
label: string
href?: string // omit on the current page; rendered as text with aria-current
}The item slot receives { item, index, isCurrent } to render a custom link (e.g. a <router-link>).
PageHeader
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | — | Heading text, rendered as an <h1>. |
description | string | — | Supporting text under the heading. |
Slots: breadcrumbs, title, description, actions. The heading renders only when a title or the title slot is present.
PageContent
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'sm' | 'md' | 'lg' | 'xl' | 'full' | 'lg' | Max width (wraps Container). |
Accessibility
Breadcrumbsrenders anavwith anaria-label; the last item carriesaria-current="page", and the separators arearia-hidden, so screen readers announce the trail without the chevrons.PageHeaderrenders the title as a real<h1>, giving the page its heading landmark; the description and actions are ordinary content and controls.PageContentis a plain container with no role, so it does not affect the accessibility tree.
Dark mode & RTL
- All three use semantic tokens (
border-border,text-foreground,text-muted), so they adapt to dark mode automatically. - Breadcrumb separators use
ChevronRightwithrtl:rotate-180, and the trail uses logicalgap, so it reads correctly right-to-left.
