Components

Breadcrumb

Show an SEO-friendly breadcrumb trail with JSON-LD structured data.

UiBreadcrumb renders an ordered trail from root to current page. The last item (or any item with current: true) renders as plain text with aria-current="page". By default it emits a schema.org BreadcrumbList as inline JSON-LD.

Add a breadcrumb

<script setup lang="ts">
import type { IBreadcrumbItem } from '@colorffy/ui'
import { NuxtLink } from '#components'

const items: IBreadcrumbItem[] = [
  { label: 'Home', to: '/', icon: '&#xe88a;' },
  { label: 'Projects', to: '/projects' },
  { label: 'Atlas' }, // no `to` → current page
]
</script>

<template>
  <UiBreadcrumb
    :as="NuxtLink"
    :items="items"
    base-url="https://example.com"
    separator-icon="&#xe5cc;"
  />
</template>

Collapse a long trail

maxItems collapses the middle visually; the JSON-LD keeps every item:

<template>
  <UiBreadcrumb :items="items" :max-items="3" />
</template>

Props

PropTypeDefaultDescription
itemsIBreadcrumbItem[]—Ordered trail (required).
asstring | object'a'Link component ('a', 'router-link', NuxtLink).
separatorstring'/'Text separator.
separatorIconstring | null—Material icon separator (overrides separator).
baseUrlstring—Absolute origin for JSON-LD URLs.
structuredDatabooleantrueEmit schema.org JSON-LD.
maxItemsnumber0Collapse long trails (0 = off; visual only).
ariaLabelstring'Breadcrumb'<nav> landmark name.
customClassstring | string[] | Record<string, boolean> | null—Extra classes for the <nav>.

Item (IBreadcrumbItem): label, to?, href?, icon?, current?. Emits: itemClick(item, index). Slots: #item="{ item, index, isCurrent }", #separator.

CSS variables

Set these on :root, or on any wrapper to restyle only the breadcrumbs inside it.

:root {
  --cffy-breadcrumb-color: var(--cffy-primary-a10);
  --cffy-breadcrumb-separator-color: var(--cffy-primary-a30);
}
VariableDefaultControls
--cffy-breadcrumb-gap--cffy-space-8Space between items and separators
--cffy-breadcrumb-color / --cffy-breadcrumb-hover-color--cffy-muted-a10 / --cffy-on-backgroundLinks, and hovered or focused links
--cffy-breadcrumb-current-color / --cffy-breadcrumb-current-font-weight--cffy-on-background / --cffy-fw-600Current page
--cffy-breadcrumb-current-max-width32remWidth before the current label is truncated
--cffy-breadcrumb-separator-color--cffy-muted-a10Separators and the collapsed …
--cffy-breadcrumb-font-size--cffy-fs-xsItem text
--cffy-breadcrumb-icon-size / --cffy-breadcrumb-icon-color--cffy-fs-base / --cffy-muted-a10Item icons (the size also applies to icon separators)
--cffy-breadcrumb-easing / --cffy-breadcrumb-durationease / --cffy-duration-150Link color transition
Copyright © 2026