Breadcrumb
ui.widgets.Breadcrumb表达当前位置及祖先路径。Shows the current location and its ancestors.
BEHAVIOR CONTRACT
分隔符、当前项、点击项与截断策略保持可读语义。Separators, current item, clickable items and truncation stay readable.
RECORDED INTERACTION
录像展示 Home / Library / Data。Shows Home / Library / Data.
// ── Breadcrumb ──
pub fn buildBreadcrumb(scope: *ui.Scope, cx: *ui.Cx) anyerror!*ui.Node {
const items = [_]W.BreadcrumbItem{
.{ .id = "home", .label_text = "Home" },
.{ .id = "lib", .label_text = "Library" },
.{ .id = "data", .label_text = "Data" },
};
return W.Breadcrumb(.{ .items = &items }).mount(scope, cx);
}这是 Storybook 中该 story 的原样代码(zenit 5f9add5+wip 2026-09-30)。其中 W 即 ui.widgets,col / row / label 是 Storybook 内的布局小工具。The story's verbatim source from the Storybook (zenit 5f9add5+wip 2026-09-30). W is ui.widgets; col / row / label are small Storybook layout helpers.