Reference

Breadcrumb

Breadcrumb trail. An item without to is the current page.

Breadcrumb { … }

Before 5.0

No props to try.

Example

wf

Breadcrumb { Breadcrumb.Item(to: "/") { Text("Home") } Breadcrumb.Item(to: "/reference") { Text("Reference") } Breadcrumb.Item { Text("Breadcrumb") } }

With an icon for home

wf

Breadcrumb(aria-label: "You are here") { Breadcrumb.Item(to: "/") { Icon("home") } Breadcrumb.Item(to: "/learn") { Text("Learn") } Breadcrumb.Item { Text("Data") } }

Props

This element takes no props of its own.

Attribute families: global, aria, data. Plus the 22 universal props every element takes: animate:, exit:, speed:, duration:, delay:, easing:, stagger:, on:, count:, shared:, class:, ref:, drag:, dragGroup:, dropValue:, dropAxis:, dropInside:, roving:, trapFocus:, mount:, update:, cleanup:.

Flags and cases

A flag is written after the parentheses with a dot: a Bool prop, or a case of one of the element's enum props. A case the enum lacks is an error with a hint.

No flags of its own.

Events

Every element also takes the props, the events and the attribute families listed on every element.

Slots

children

Parts

The parts of Breadcrumb are written under its name, inside it. Each is described here, with what it takes.

One step of the trail.

Breadcrumb.Item(to: Path) { … }
Props of Breadcrumb.Item
PropTypeUnsetMeaning

to:

Path

none: the current page

The route the step links to, followed through the router as a Link is. Without it the step is the current page, aria-current="page"

Renders with the class wf-breadcrumb, stable across releases, so a stylesheet may target it.

These controls list the props' cases; the example below shows them written.