Timeline

public struct Timeline
extension Timeline: View
extension Timeline: _ViewEmptyChecking

Timeline is a selectable view intended for timelines that require open, inProgress and complete status that displays timeline details. It uses a vertical line and timelineNode as a separator. To the left of the vertical line is the timeline timestamp stack view that contains timestamp and secondaryTimestamp. To the right of the vertical line is the main stack view that contains title view and attribute view. Title view contains title, ‘subtitle’, ‘status’, ‘substatus’, below the title view is an attribute view with ‘ attribute’ and ‘subAttribute’. There is a divider line as separator under main stack.

## Notes

Separator between Timeline Items in the List

All list styles in SwiftUI include separators by default. That is why there is a separator between two timeline items in the list. To get rid of the separator, set ‘listRowSeparator’ modifier to hidden.

Usage

Timeline(timestamp: "06/21/24", secondaryTimestamp: .icon(Image(systemName: "sun.max")), timelineNode: .complete, title: "Complete(Disabled)", subtitle: "abc", attribute: "attr", status: .text("Info"), substatus: .icon(Image(systemName: "exclamationmark.circle")), subAttribute: "subAttr", isPast: true)
Timeline(timestamp: "06/21/24", secondaryTimestamp: .text("Sunny"), timelineNode: .open, title: "Open", subtitle: "abc", attribute: "attr", status: .text("Info"), substatus: .icon(Image(systemName: "exclamationmark.circle")), subAttribute: "subAttr")