Sequence
docs
Astro components

Breadcrumbs

Displays a path of links to the current resource.

A navigation component that displays the current location within the site hierarchy.

Usage

---
import Breadcrumbs from '@/components/Breadcrumbs.astro';
---

const items = [
  { name: 'Home', url: '/' },
  { name: 'Docs', url: '/docs' },
  { name: 'Button', url: '/docs/button' },
];

<Breadcrumbs items={items} />

Props

PropTypeDefaultDescription
itemsBreadcrumbItem[][]Array of breadcrumb items. Each item has a name and url.
separatorstring'/'The visual separator between items.
classstring-Class for the nav wrapper.
olClassstring-Class for the ordered list (<ol>).
liClassstring-Class for the list items (<li>).
interface BreadcrumbItem {
  name: string;
  url: string;
}

On this page