Tokens v2.14.0 release notes Published
GhostBreadcrumb
GhostBreadcrumb implements the WAI-ARIA APG breadcrumb pattern with compound list, item, link, page, separator, and ellipsis parts. Import the parts from @ghostvue/themes for the default trail styling. For unstyled markup with your own CSS, see Advanced: headless composition.
Show where a page sits
Workspace breadcrumb trail
Themed breadcrumb trail with collapsed parent segments above a release header.
workspace-trail.vue
vue
<script setup lang="ts">
import {
GhostBadge,
GhostBreadcrumb,
GhostBreadcrumbEllipsis,
GhostBreadcrumbItem,
GhostBreadcrumbLink,
GhostBreadcrumbList,
GhostBreadcrumbPage,
GhostBreadcrumbSeparator,
GhostCard,
} from '@ghostvue/themes'
</script>
<template>
<div class="breadcrumb-showcase">
<GhostCard>
<div class="breadcrumb-showcase__body">
<GhostBreadcrumb aria-label="Project location">
<GhostBreadcrumbList>
<GhostBreadcrumbItem>
<GhostBreadcrumbLink href="#workspace">
Northwind
</GhostBreadcrumbLink>
<GhostBreadcrumbSeparator />
</GhostBreadcrumbItem>
<GhostBreadcrumbItem>
<GhostBreadcrumbEllipsis label="Show parent folders">
<GhostBreadcrumbLink href="#engineering">
Engineering
</GhostBreadcrumbLink>
<GhostBreadcrumbLink href="#design-systems">
Design Systems
</GhostBreadcrumbLink>
<GhostBreadcrumbLink href="#tokens">
Tokens
</GhostBreadcrumbLink>
</GhostBreadcrumbEllipsis>
<GhostBreadcrumbSeparator />
</GhostBreadcrumbItem>
<GhostBreadcrumbItem>
<GhostBreadcrumbLink href="#releases">
Releases
</GhostBreadcrumbLink>
<GhostBreadcrumbSeparator />
</GhostBreadcrumbItem>
<GhostBreadcrumbItem>
<GhostBreadcrumbPage>v2.14.0</GhostBreadcrumbPage>
</GhostBreadcrumbItem>
</GhostBreadcrumbList>
</GhostBreadcrumb>
<div class="breadcrumb-showcase__header">
<span class="breadcrumb-showcase__title">
Tokens v2.14.0 release notes
</span>
<GhostBadge tone="success" variant="soft" size="sm">
Published
</GhostBadge>
</div>
</div>
</GhostCard>
</div>
</template>
<style scoped>
.breadcrumb-showcase {
display: grid;
}
.breadcrumb-showcase__body {
display: grid;
gap: var(--ghost-space-gap-sm);
}
.breadcrumb-showcase__header {
align-items: center;
display: flex;
flex-wrap: wrap;
gap: var(--ghost-space-gap-sm);
justify-content: space-between;
}
.breadcrumb-showcase__title {
color: var(--ghost-text-default);
font-size: var(--ghost-type-size-md);
font-weight: var(--ghost-type-weight-semibold);
line-height: var(--ghost-type-line-snug);
}
</style>
A release page header leads with a GhostBreadcrumb trail from @ghostvue/themes. Each ancestor is a GhostBreadcrumbLink, an ordinary <a href> that the browser or your router follows, so readers can Tab to a parent and press Enter to go there. The current release is a GhostBreadcrumbPage, which sets aria-current="page" and is not a link. aria-label="Project location" names the navigation landmark, so screen reader users can tell it from the site navigation.
Three middle folders sit behind a GhostBreadcrumbEllipsis labelled "Show parent folders". Press Enter or Space on it to open a menu of those links, then Tab through them; Escape closes the menu and returns focus to the ellipsis.
Collapsed middle segments
Collapsed segments
Ellipsis popover exposes middle ancestors.
collapsed.vue
vue
<script setup lang="ts">
import {
GhostBreadcrumb,
GhostBreadcrumbEllipsis,
GhostBreadcrumbItem,
GhostBreadcrumbLink,
GhostBreadcrumbList,
GhostBreadcrumbPage,
GhostBreadcrumbSeparator,
} from '@ghostvue/themes'
</script>
<template>
<GhostBreadcrumb aria-label="Settings trail">
<GhostBreadcrumbList>
<GhostBreadcrumbItem>
<GhostBreadcrumbLink href="#">Home</GhostBreadcrumbLink>
<GhostBreadcrumbSeparator />
</GhostBreadcrumbItem>
<GhostBreadcrumbItem>
<GhostBreadcrumbEllipsis label="Show hidden segments">
<GhostBreadcrumbLink href="#">Products</GhostBreadcrumbLink>
<GhostBreadcrumbLink href="#">Catalog</GhostBreadcrumbLink>
<GhostBreadcrumbLink href="#">Releases</GhostBreadcrumbLink>
</GhostBreadcrumbEllipsis>
<GhostBreadcrumbSeparator />
</GhostBreadcrumbItem>
<GhostBreadcrumbItem>
<GhostBreadcrumbLink href="#">Components</GhostBreadcrumbLink>
<GhostBreadcrumbSeparator />
</GhostBreadcrumbItem>
<GhostBreadcrumbItem>
<GhostBreadcrumbPage>Breadcrumb</GhostBreadcrumbPage>
</GhostBreadcrumbItem>
</GhostBreadcrumbList>
</GhostBreadcrumb>
</template>
GhostBreadcrumbEllipsis composes GhostPopover so middle segments stay reachable by keyboard and assistive technologies. Put collapsed links in the ellipsis default slot and give the ellipsis a label that says what it hides. Attributes such as class and style land on the ellipsis host element. The popover content is portaled to body; the themed part marks both the trigger and that content with data-themed, so the menu gets the elevated popover surface without a .ghost-theme ancestor.
Place each GhostBreadcrumbSeparator inside the same GhostBreadcrumbItem as the preceding link or ellipsis, so separators never become invalid direct children of the ol.
Custom separators
Use the separator slot for non-default glyphs:
vue
<GhostBreadcrumbSeparator aria-hidden="true">/</GhostBreadcrumbSeparator>Decorative separators are always aria-hidden="true".
Accessibility
Follow the breadcrumb specification for landmark naming, current-page semantics, and ellipsis keyboard support.
Advanced: headless composition
For teams that bring their own design system, the same parts from @ghostvue/vue render the landmark, ordered list, links, current page and separators with no visual styling.
Basic trail
Basic Headless
Headless ordered trail with current page semantics, laid out by consumer CSS on data-part hooks.
basic.vue
vue
<script setup lang="ts">
import {
GhostBreadcrumb,
GhostBreadcrumbItem,
GhostBreadcrumbLink,
GhostBreadcrumbList,
GhostBreadcrumbPage,
GhostBreadcrumbSeparator,
} from '@ghostvue/vue'
</script>
<template>
<div class="breadcrumb-demo">
<GhostBreadcrumb aria-label="Project trail">
<GhostBreadcrumbList>
<GhostBreadcrumbItem>
<GhostBreadcrumbLink href="#">Home</GhostBreadcrumbLink>
<GhostBreadcrumbSeparator />
</GhostBreadcrumbItem>
<GhostBreadcrumbItem>
<GhostBreadcrumbLink href="#">Projects</GhostBreadcrumbLink>
<GhostBreadcrumbSeparator />
</GhostBreadcrumbItem>
<GhostBreadcrumbItem>
<GhostBreadcrumbPage>GhostVue</GhostBreadcrumbPage>
</GhostBreadcrumbItem>
</GhostBreadcrumbList>
</GhostBreadcrumb>
</div>
</template>
<!--
The headless parts render semantic markup only. This consumer CSS lays the
trail out inline and styles the parts through their data-part hooks; the
system-color fallbacks keep it readable without a theme.
-->
<style>
.breadcrumb-demo [data-part='list'] {
align-items: center;
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
list-style: none;
margin: 0;
padding: 0;
}
.breadcrumb-demo [data-part='item'] {
align-items: center;
display: inline-flex;
gap: 0.25rem;
margin: 0;
}
.breadcrumb-demo [data-part='link'] {
color: var(--ghost-text-primary, LinkText);
}
.breadcrumb-demo [data-part='link']:focus-visible {
outline: var(--ghost-focus-ring-width, 2px) solid
var(--ghost-focus-ring-color, Highlight);
outline-offset: 2px;
}
.breadcrumb-demo [data-part='separator'] {
color: var(--ghost-text-muted, GrayText);
}
.breadcrumb-demo [data-part='page'] {
color: var(--ghost-text-default, CanvasText);
font-weight: 600;
}
</style>
Ancestor segments use GhostBreadcrumbLink. The current page uses GhostBreadcrumbPage, which sets aria-current="page". The headless parts add no list reset or inline layout. The example's own CSS lays the trail out on one wrapping line and styles the parts through their data-part hooks (list, item, link, separator, page), with system-color fallbacks so it stays readable without a theme.
API
See the specification. Generated manifests live under packages/vue/manifests/ghost-breadcrumb*.manifest.json.
| Prop | Type | Default | Description |
|---|---|---|---|
ariaLabel | string | "Breadcrumb" | Accessible name for the breadcrumb navigation. |
as | GhostBreadcrumbElement | "nav" | Tag name or component rendered for the navigation landmark. |
| Slot | Slot props | Description |
|---|---|---|
default | — | Primary content. |
@ghostvue/themes adds no props, events, or slots to the headless GhostBreadcrumb API, which it forwards.
| Part | Element | Key semantics |
|---|---|---|
GhostBreadcrumb | nav | aria-label |
GhostBreadcrumbList | ol | ordered trail |
GhostBreadcrumbItem | li | wraps segment + separator |
GhostBreadcrumbLink | a | ancestor hyperlink |
GhostBreadcrumbPage | span | aria-current="page" |
GhostBreadcrumbSeparator | span | aria-hidden |
GhostBreadcrumbEllipsis | button | popover with collapsed ancestors |
GhostBreadcrumbLink takes a router link component through as, typed like GhostLink: :as="RouterLink" checks to under strictTemplates.