Trail of the current page's location in the site hierarchy, with the current page marked by aria-current.
<x-markas.breadcrumb :items="[
['label' => 'Home', 'href' => '/'],
['label' => 'Components', 'href' => '/components'],
['label' => 'Breadcrumb'],
]" />import { Breadcrumb } from "@/components/markas/Breadcrumb";
const items = [
{ label: "Home", href: "/" },
{ label: "Components", href: "/components" },
{ label: "Breadcrumb" },
];
export default function BreadcrumbExample() {
return <Breadcrumb items={items} />;
}<script lang="ts">
import Breadcrumb from "$lib/components/markas/Breadcrumb.svelte";
const items = [
{ label: "Home", href: "/" },
{ label: "Components", href: "/components" },
{ label: "Breadcrumb" },
];
</script>
<Breadcrumb {items} />---
import Breadcrumb from "@/components/markas/Breadcrumb.astro";
const items = [
{ label: "Home", href: "/" },
{ label: "Components", href: "/components" },
{ label: "Breadcrumb" },
];
---
<Breadcrumb items={items} />Examples
Long path
<x-markas.breadcrumb :items="[
['label' => 'Home', 'href' => '/'],
['label' => 'Store', 'href' => '/store'],
['label' => 'Electronics', 'href' => '/store/electronics'],
['label' => 'Audio', 'href' => '/store/electronics/audio'],
['label' => 'Headphones', 'href' => '/store/electronics/audio/headphones'],
['label' => 'Wireless', 'href' => '/store/electronics/audio/headphones/wireless'],
['label' => 'Studio Pro X'],
]" />Page header
Settings
Manage access and notifications for this project.
Settings
Manage access and notifications for this project.
Settings
Manage access and notifications for this project.
Settings
Manage access and notifications for this project.
Settings
Manage access and notifications for this project.
File path
<div class="rounded-lg border border-line bg-subtle px-3 py-2">
<x-markas.breadcrumb nav-label="File path" :items="[
['label' => 'markasui', 'href' => '/'],
['label' => 'components', 'href' => '/components'],
['label' => 'tabs', 'href' => '/components/tabs'],
['label' => 'Tabs.tsx'],
]" />
</div>Installation
npx markasui@latest add breadcrumbpnpm dlx markasui@latest add breadcrumbyarn dlx markasui@latest add breadcrumbbunx --bun markasui@latest add breadcrumb- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
resources/views/components/markas/breadcrumb.blade.php.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/Breadcrumb.tsx.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/Breadcrumb.vue.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/lib/components/markas/Breadcrumb.svelte.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/Breadcrumb.astro.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/app/markas/breadcrumb.component.ts.
Usage
<x-markas.breadcrumb :items="[
['label' => 'Home', 'href' => '/'],
['label' => 'Components', 'href' => '/components'],
['label' => 'Breadcrumb'],
]" />No Alpine.js needed.
import { Breadcrumb } from "@/components/markas/Breadcrumb";
<Breadcrumb
items={[
{ label: "Home", href: "/" },
{ label: "Components", href: "/components" },
{ label: "Breadcrumb" },
]}
/>;<template>
<Breadcrumb
:items="[
{ label: 'Home', href: '/' },
{ label: 'Components', href: '/components' },
{ label: 'Breadcrumb' },
]"
/>
</template><script lang="ts">
import Breadcrumb from "$lib/components/markas/Breadcrumb.svelte";
</script>
<Breadcrumb
items={[
{ label: "Home", href: "/" },
{ label: "Components", href: "/components" },
{ label: "Breadcrumb" },
]}
/>---
import Breadcrumb from "@/components/markas/Breadcrumb.astro";
---
<Breadcrumb
items={[
{ label: "Home", href: "/" },
{ label: "Components", href: "/components" },
{ label: "Breadcrumb" },
]}
/>No JavaScript is shipped.
import { Component } from "@angular/core";
import { Breadcrumb } from "./markas/breadcrumb.component";
@Component({
selector: "app-page-trail",
imports: [Breadcrumb],
template: `<nav markas-breadcrumb [items]="items"></nav>`,
})
export class PageTrail {
readonly items = [
{ label: "Home", href: "/" },
{ label: "Components", href: "/components" },
{ label: "Breadcrumb" },
];
}- The last item is always rendered as text with
aria-current="page", even when it has anhref. - The nav is labelled “Breadcrumb”. Translate it with
navLabel(Blade:nav-label).
Props
| Name | Type | Default | Description |
|---|---|---|---|
items | { label, href? }[] | [] | Pages from the root to the current page. The last item is treated as the current page and has no link. |
navLabel | string | Breadcrumb | Accessible label of the nav element. |
Accessibility
- Wrapped in a nav labelled by navLabel and an ordered list (ol).
- The last item has aria-current=page.
- Chevron separators are aria-hidden, so they are not announced.
Related components
More navigation components with the same classes in every framework.
- AccordionCollapsible sections built on native details and summary, no JavaScript needed.
- CollapsibleA single section that opens and closes, built on native details and summary without JavaScript. Good for show more content.
- FooterSite footer with six layouts: link columns, centered glow, newsletter pill card, giant cropped wordmark, dark glowing call to action, and a floating pill.
- MenubarHorizontal bar of menus like a desktop app, built on the Popover API, with keyboard support following the WAI-ARIA Menubar pattern.
- NavbarSite header with a brand, links, dropdown menus, a sliding hover pill, an actions area, and a mobile menu with collapsible groups.
- Navigation MenuDesktop site navigation with mega menu panels on the Popover API, a sliding active indicator, hover intent, and WAI-ARIA disclosure keyboard support.