Breadcrumb
The path to the current page, as a nav landmark with an ordered list.
On this page
Examples
Breadcrumb
Pure markup: works in every render mode.
Razor
<KlyBreadcrumb Items="Items" AriaLabel="You are here" />
@code {
private static readonly KlyBreadcrumbItem[] Items =
[
new("Home") { Href = "/", Icon = KlyIcons.Named("info", "size-4") },
new("Components") { Href = "/components/button" },
new("Breadcrumb"),
];
}API
KlyBreadcrumb
Navigation trail of the current page and its ancestors. It is plain markup and works in every render mode.
Parameters
| Name | Type | Description |
|---|---|---|
AriaLabel |
string |
Accessible name of the landmark. Defaults to Breadcrumb . |
Class |
string |
Classes added to the root element, merged last so they win over the theme. |
Items (required) |
IReadOnlyList |
The pages of the trail, from the root to the current page, as KlyBreadcrumbItem . The last one is the current page. |
Ui |
BreadcrumbUi |
Per-instance class overrides of the slots of the breadcrumb, see BreadcrumbUi . They are merged after the theme and the Class parameter wins on the root slot. |
Slots
| Name | Type | Description |
|---|---|---|
Separator |
RenderFragment |
Replaces the chevron between items. Decorative: it is hidden from assistive technology. |
Ui slots
Ui takes a BreadcrumbUi with one class string per slot, merged after the theme.
| Slot | Styles |
|---|---|
Root |
Classes merged into the root slot of KlyBreadcrumb , after the theme and the app configuration. |
List |
Classes merged into the list slot of KlyBreadcrumb , after the theme and the app configuration. |
Item |
Classes merged into the item slot of KlyBreadcrumb , after the theme and the app configuration. |
Link |
Classes merged into the link slot of KlyBreadcrumb , after the theme and the app configuration. |
Icon |
Classes merged into the icon slot of KlyBreadcrumb , after the theme and the app configuration. |
Label |
Classes merged into the label slot of KlyBreadcrumb , after the theme and the app configuration. |
Separator |
Classes merged into the separator slot of KlyBreadcrumb , after the theme and the app configuration. |
SeparatorIcon |
Classes merged into the separatorIcon slot of KlyBreadcrumb , after the theme and the app configuration. |