Breadcrumb
Breadcrumb shows where the current page sits in a hierarchy, such as a
folder tree, nested collection, or settings section.
It is a location trail, not a replacement for your app's main navigation.
Example
use fission::prelude::*;
fission_component! {
pub DocumentLocation<()> {
props {
filename: String,
open_workspace: ActionEnvelope,
open_documents: ActionEnvelope,
}
}
view(location, _state, cx) =>
Breadcrumb(
items: vec![
BreadcrumbItem {
label: cx.tr("navigation.workspace"),
on_click: Some(location.open_workspace.clone()),
},
BreadcrumbItem {
label: cx.tr("navigation.documents"),
on_click: Some(location.open_documents.clone()),
},
BreadcrumbItem {
label: location.filename.clone(),
on_click: None,
},
],
)
}
The parent binds navigation to the actual workspace and folder. The current
filename is data, not a translation key. BreadcrumbItem is an ordinary Rust
configuration value; Compose constructs the visible Breadcrumb.
In this pattern the last item marks the current location, while earlier items let the user move upward.
Field table
| | | |
|---|
| | Path steps shown from left to right. | Defaults to an empty list. |
Layout and behavior
The checked-in renderer inserts chevrons between items, renders clickable steps as ghost buttons, and shows the last step as primary text. Non-final items without on_click are shown as secondary text.
Because the underlying layout is a single row, long breadcrumb trails can become cramped on narrow screens. On mobile or very dense headers, it is often better to shorten the path or move part of the hierarchy into a separate back action.
Specific advice
Breadcrumbs should move upward in a hierarchy, not trigger unrelated actions. If an item does something surprising, the trail stops feeling trustworthy.
Production checklist
Verify every ancestor action navigates to its actual hierarchy level.
Test a long filename and deep path at the narrowest supported width.
Keep the final item non-actionable and expose it as the current location.