Flutter docs
Default skin

Timeline

Vertical display timeline.

When to use

  • When a series of information needs to be ordered by time (ascending or descending).
  • When you need a timeline to make a visual connection.

Examples

Basic

Basic timeline.

Loading and Reversing

Node supports loading to indicate loading, and reverse property to control the order of nodes.

Horizontal

Horizontal layout.

End alternate

End alternate timeline.

Title Offset

Use titleSpan to set the title span space.

Custom semantic dom styling

You can customize the semantic dom style of Timeline by passing objects/functions through classNames and styles.

Variant

Use the variant to set the style of the timeline.

Alternate

Alternate timeline.

Custom

Set a node as an icon or other custom element.

Title

Use title show time alone.

Semantic Sample

Achieve richer custom styles by using semantic structure.

API

Timeline and Timeline.Item are exported from @ceebee/ui/client.

Timeline

PropertyDescriptionTypeDefaultVersion
classNamesCustomize class for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, string> | (info: { props })=> Record<SemanticDOM, string>-—
itemsEach node of timelineItems[]-—
modeBy sending alternate the timeline will distribute the nodes to the left and rightstart | alternate | endstart—
orientationSet the direction of the timelinevertical | horizontalvertical—
pendingSet the last ghost node's existence or its content. Use item.loading insteadReactNodefalse—
pendingDotSet the dot of the last ghost node when pending is true. Use item.icon insteadReactNode&lt;LoadingOutlined /&gt;—
reverseWhether reverse nodes or notbooleanfalse—
stylesCustomize inline style for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, CSSProperties> | (info: { props })=> Record<SemanticDOM, CSSProperties>-—
titleSpanSet the title span space. It is the distance to the center of the dot <InlinePopover previewURL="https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*1NJISa7bpqgAAAAAR5AAAAgAerJ8AQ/original"></InlinePopover>number | string12—
variantConfig style variantfilled | outlinedoutlined—

Items

PropertyDescriptionTypeDefaultVersion
colorSet the circle's color to blue, red, green, gray or other custom colorsstringblue—
contentSet the contentReactNode-—
childrenSet the content. Please use content insteadReactNode-—
dotCustomize timeline dot. Please use icon insteadReactNode-—
iconCustomize node iconReactNode-—
labelSet the label. Please use title insteadReactNode-—
loadingSet loading statebooleanfalse—
placementCustomize node placementstart | end-—
positionCustomize node position. Please use placement insteadstart | end-—
titleSet the titleReactNode-—