Skip to content
MarkasUI
Type to search

    Guide

    MarkasUI

    Form

    Feedback

    Overlay

    Navigation

    Data

    Sections

    Animations

    Backgrounds

    Buttons

    Templates

    Pages

    Breadcrumb

    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 setup lang="ts">
    import Breadcrumb from "@/components/markas/Breadcrumb.vue";
    
    const items = [
      { label: "Home", href: "/" },
      { label: "Components", href: "/components" },
      { label: "Breadcrumb" },
    ];
    </script>
    
    <template>
      <Breadcrumb :items="items" />
    </template>
    <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} />
    import { Component } from "@angular/core";
    import { Breadcrumb } from "./markas/breadcrumb.component";
    
    @Component({
      selector: "markas-example",
      imports: [Breadcrumb],
      template: `<nav markas-breadcrumb [items]="items"></nav>`,
    })
    export default class BreadcrumbExample {
      protected readonly items = [
        { label: "Home", href: "/" },
        { label: "Components", href: "/components" },
        { label: "Breadcrumb" },
      ];
    }

    Examples

    Long path

    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

    Installation

    npx markasui@latest add breadcrumb

    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 an href.
    • The nav is labelled “Breadcrumb”. Translate it with navLabel (Blade: nav-label).

    Props

    NameTypeDefaultDescription
    items{ label, href? }[][]Pages from the root to the current page. The last item is treated as the current page and has no link.
    navLabelstringBreadcrumbAccessible 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.