BreadcrumbItem
BreadcrumbItem is the item record used by Breadcrumb.
Each item describes one step in a location path, such as a workspace, folder, or document hierarchy. Most non-final items are clickable. The final item usually represents the current location and is displayed as plain text.
Example
use fission::prelude::*;
let item = BreadcrumbItem {
label: "Projects".into(),
on_click: Some(open_projects_action),
};
Field table
| | | |
|---|
| | Visible text for this step in the trail. | |
| | Action fired when this breadcrumb step is chosen. | Defaults to None. In a trail, None usually means the item is not navigable. |
Specific advice
Use stable, human-readable labels. Breadcrumbs are for orientation first and navigation second. If labels are cryptic ids, the trail stops helping.
Production checklist
For BreadcrumbItem, review the fields that change behavior before treating the widget as finished: label, on_click. The goal is to make the product rule visible in state and actions, not hidden inside ad-hoc construction code.
Bind on_click to explicit reducer actions and test that the reducer handles unavailable, duplicate, or invalid input safely.
Check the semantics tree for the user-facing label or role that makes this widget understandable without relying only on pixels.
Add at least one component or harness test that confirms the visible text, semantic role, action dispatch, and layout constraint that matter for this widget in context.
If a screen starts repeating the same BreadcrumbItem setup, extract a named component around this widget. That keeps the reference API small while making product code easier to read and safer for generated code to copy.
Breadcrumb, Link, Text, and Button.