Back to Element Plus

Timeline

docs/en-US/component/timeline.md

2.13.73.5 KB
Original Source

Timeline

Visually display timeline.

Basic usage

Timeline can be split into multiple activities. Timestamps are important features that distinguish them from other components. Note the difference with Steps.

:::demo

timeline/basic

:::

Mode ^(2.13.1)

Use mode to control the relative position of timeline and content.

:::tip

After ^(2.13.1), el-timeline explicitly sets padding styles. If you have overridden padding styles of ul tag in your project, please check to ensure the layout is correct.

:::

:::demo

timeline/mode

:::

Custom node

Size, color, and icons can be customized in node.

:::demo

timeline/custom-node

:::

Custom timestamp

Timestamp can be placed on top of content when content is too high.

:::demo

timeline/custom-timestamp

:::

Vertically centered

Timeline-Item is centered vertically.

:::demo

timeline/center

:::

Reverse ^(2.11.9)

Use the reverse property to control the order of the nodes.

:::demo

timeline/reverse

:::

Timeline API

Timeline Attributes

NameDescriptionTypeDefault
reverse ^(2.11.9)whether reverse order^[boolean]false
mode ^(2.13.1)relative position of timeline and content^[enum]'start' | 'alternate' | 'alternate-reverse' | 'end'start

Timeline Slots

NameDescriptionSubtags
defaultcustomize default content for timelineTimeline-Item

Timeline-Item API

Timeline-Item Attributes

NameDescriptionTypeDefault
timestamptimestamp content^[string]''
hide-timestampwhether to show timestamp^[boolean]false
centerwhether vertically centered^[boolean]false
placementposition of timestamp^[enum]'top' | 'bottom'bottom
typenode type^[enum]'primary' | 'success' | 'warning' | 'danger' | 'info'''
colorbackground color of node^[string]''
sizenode size^[enum]'normal' | 'large'normal
iconicon component^[string] / ^[Component]
hollowicon is hollow^[boolean]false

Timeline-Item Slots

NameDescription
defaultcustomize default content for timeline item
dotcustomize defined node for timeline item