Breadcrumb trail rendered inside the main content frame, above the page body. Shows the site title followed by the sidebar-derived crumb path for the current page.
The crumb list is built by walking the sidebar tree with getBreadcrumb(). Falls back to pageTitle when the current slug is not found in the tree.
Layout note: This component is placed inside
.igd-main-contentinDocsLayout, not in the fixed subheader bar. SeeDocsSubHeaderfor the top bar.
import DocsBreadcrumb from 'igniteui-astro-components/components/DocsBreadcrumb.astro';| Prop | Type | Default | Description |
|---|---|---|---|
currentSlug |
string |
'' |
Slug of the current page — used to derive the crumb path from the sidebar tree. |
pageTitle |
string | null |
— | Fallback label shown as the last crumb when currentSlug is not found in the tree. |
siteTitle |
string |
virtual module | Override the site name shown as the first crumb. |
sidebarItems |
SidebarEntry[] |
virtual module | Override the sidebar tree used for crumb generation. |
- Renders a semantic
<nav aria-label="Breadcrumb"><ol>structure. - The first item is the site title (from
virtual:docs-template/site-metaor thesiteTitleprop). - Subsequent items are the ancestor labels from the sidebar tree leading to the current page.
- The last crumb (current page) is visually emphasised.
- Renders nothing when both
siteTitleand the crumb list are empty.
---
import DocsBreadcrumb from 'igniteui-astro-components/components/DocsBreadcrumb.astro';
import type { SidebarEntry } from 'igniteui-astro-components/lib/sidebar/types';
const sidebar: SidebarEntry[] = [
{ label: 'Components', collapsed: false, items: [
{ label: 'Toast', slug: 'components/toast' },
]},
];
---
<DocsBreadcrumb
siteTitle="My Library"
currentSlug="components/toast"
sidebarItems={sidebar}
/>All props are optional when the virtual module provides the data:
---
import DocsBreadcrumb from 'igniteui-astro-components/components/DocsBreadcrumb.astro';
---
<DocsBreadcrumb currentSlug="components/toast" pageTitle="Toast" />This component is used automatically inside DocsLayout — you only need to
mount it directly when building a custom page shell.