Timeline
ui.widgets.Timeline시간이나 상태별로 세로 이벤트를 표시합니다.
BEHAVIOR CONTRACT
completed / current / pending, 시간, 제목, 설명이 하나의 레일에 정렬됩니다.
RECORDED INTERACTION
주문의 수명 주기를 보여 줍니다.
// ── 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 내부의 작은 레이아웃 헬퍼입니다.
TimelineProps
ui.widgets.Timelinefn Timeline(props: TimelineProps) TimelineBuilder필드
타입
기본값
설명
items[]const TimelineItem&.{}—
*Node
ui.widgets.Timelinemount는 *Node을(를) 직접 반환합니다. 부모 노드에 append하면 됩니다.