Slot-based breadcrumb component.
Owns the <nav aria-label="Breadcrumb"> wrapper, the <ol>/<li>
structure, the divider placement (between items, never after the last),
and the aria-current="page" marker on the current page. Styling is
supplied via three slots, each receiving a %PhoenixPageMeta.Breadcrumb{}.
When the resulting trail is empty (e.g. all pages have :skip_breadcrumb
set), nothing is rendered.
<PhoenixPageMeta.Components.Breadcrumbs.list page_meta={@page_meta}>
<:link :let={breadcrumb}>
<.link navigate={breadcrumb.path}>{breadcrumb.title}</.link>
</:link>
<:current :let={breadcrumb}>
<span class="font-medium">{breadcrumb.title}</span>
</:current>
<:divider>/</:divider>
</PhoenixPageMeta.Components.Breadcrumbs.list>
Summary
Functions
Renders an accessible breadcrumb trail from a PageMeta struct.
Functions
Renders an accessible breadcrumb trail from a PageMeta struct.
Slots
:link— rendered for every ancestor (not the current page). Receives a%PhoenixPageMeta.Breadcrumb{}.:current— rendered for the current page. Receives a%PhoenixPageMeta.Breadcrumb{}.:divider— rendered between items. No argument.
Attributes
page_meta(:any) (required)- Global attributes are accepted. Additional HTML attributes (e.g.
class) applied to the<nav>.
Slots
link(required)current(required)divider(required)