BreadcrumbItem
BreadcrumbItem describes one step in a Breadcrumb,
such as a workspace, folder, or document. Earlier steps can link back up the path; the final item normally names the
current location.
Example
use fission::prelude::*;
let item = BreadcrumbItem {
label: cx.tr("projects.title"),
on_click: Some(open_projects_action),
};
This setup-block excerpt uses an already bound navigation action.
BreadcrumbItem is configuration data for Breadcrumb, not a widget; an
ordinary Rust struct is appropriate here. The final item normally has no
navigation action because it already describes the current location.
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
Verify that each earlier item navigates to the location its label names.
Keep the current item non-navigable unless returning to that same location
has a deliberate product meaning.
Test long translated labels and a deep trail at the narrowest supported width.