Timeline
ui.widgets.Timeline按时间或状态展示纵向事件。Vertical events by time or status.
BEHAVIOR CONTRACT
completed / current / pending、时间、标题与描述按统一轨道对齐。completed / current / pending, time, title and description align on one rail.
RECORDED INTERACTION
录像展示订单生命周期。Shows an order lifecycle.
// ── Timeline ──
pub fn buildTimeline(scope: *ui.Scope, cx: *ui.Cx) anyerror!*ui.Node {
const items = [_]W.TimelineItem{
.{ .title = "Created", .description = "Order placed", .time = "09:00", .status = .completed },
.{ .title = "Shipped", .description = "In transit", .time = "12:30", .status = .active },
.{ .title = "Delivered", .description = "Pending", .status = .pending },
};
return W.Timeline(.{ .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.