EN
Getting started
11 · Menu

Breadcrumb

A breadcrumb that shows where the page sits in the application. A root link with a home icon is added at the start automatically; the last item is rendered as plain text as the current page.

acun:breadcrumb
01

Basic usage

Pass the items in the items array in order, from the root to the page. You do not need to add the root. The last item is rendered as plain text even if it has a link, and gets aria-current="page".

LIVE EXAMPLE
<acun:breadcrumb home-url="#" :items="[
    ['label' => 'Customers', 'url' => '#'],
    ['label' => 'Customer List', 'url' => '#'],
    ['label' => 'Edit'],
]" />
PropValues
items[['label' => …, 'url' => …], …]
02

With a route name

Instead of a URL, you can pass a route name with the route key; the link is generated with route(). Links open with wire:navigate.

BLADE
<acun:breadcrumb :items="[
    ['label' => 'Customers', 'route' => 'customers.index'],
    ['label' => $customer->name],
]" />
PropValues
items[].routeRoute name
items[].urlDirect URL; takes precedence over route
04

Composable usage

Instead of passing items, you can write the items with acun:breadcrumb.item: an item with href is a link, and an item without it (or with current) is the current page and gets aria-current="page". Items can carry rich content (icons, badges); the separator is replaced with acun:breadcrumb.separator (then pass :separator="false" to the next item). The home link is still added automatically.

LIVE EXAMPLE
<div class="space-y-4">
    <acun:breadcrumb home-url="#">
        <acun:breadcrumb.item href="#">Stores</acun:breadcrumb.item>
        <acun:breadcrumb.item href="#">Kadıköy branch</acun:breadcrumb.item>
        <acun:breadcrumb.item>Orders</acun:breadcrumb.item>
    </acun:breadcrumb>

    <acun:breadcrumb home-url="#">
        <acun:breadcrumb.item href="#" class="flex items-center gap-1"><acun:icon name="building-storefront" size="4" /> Stores</acun:breadcrumb.item>
        <acun:breadcrumb.separator>/</acun:breadcrumb.separator>
        <acun:breadcrumb.item :separator="false">Kadıköy branch <acun:badge variant="warning">3 orders waiting</acun:badge></acun:breadcrumb.item>
    </acun:breadcrumb>
</div>
PropValues
acun:breadcrumb.itemhref, current, separator
acun:breadcrumb.separatorslot: separator (default: arrow)
API

Props and slots

The values the component accepts.

PropDefaultDescription
items[]['label' => …, 'url' => … | 'route' => …]; the last item and items without a URL are plain text
home-routedashboardRoute name of the root link; the site root if the route does not exist
home-urlnullDirect URL of the root link
home-labelnullAccessible name of the root; defaults to "Home"
breadcrumb.item: href · current · separatornull · when no href · trueLink, current page (aria-current) and the separator before it
breadcrumb.separator — Custom separator; an arrow when the slot is empty
Acun UI · BreadcrumbDetailed usage and examples