logoAnt Design

⌘ K
  • Design
  • Development
  • Components
  • Blog
  • Resources
6.0.0-alpha.3
  • Components Overview
  • Changelog
    v6.0.0-alpha.3
  • General
    • Button
    • FloatButton
      5.0.0
    • Icon
    • Typography
  • Layout
    • Divider
    • Flex
      5.10.0
    • Grid
    • Layout
    • Masonry
      6.0.0
    • Space
    • Splitter
      5.21.0
  • Navigation
    • Anchor
    • Breadcrumb
    • Dropdown
    • Menu
    • Pagination
    • Steps
    • Tabs
  • Data Entry
    • AutoComplete
    • Cascader
    • Checkbox
    • ColorPicker
      5.5.0
    • DatePicker
    • Form
    • Input
    • InputNumber
    • Mentions
    • Radio
    • Rate
    • Select
    • Slider
    • Switch
    • TimePicker
    • Transfer
    • TreeSelect
    • Upload
  • Data Display
    • Avatar
    • Badge
    • Calendar
    • Card
    • Carousel
    • Collapse
    • Descriptions
    • Empty
    • Image
    • List
      DEPRECATED
    • Popover
    • QRCode
      5.1.0
    • Segmented
    • Statistic
    • Table
    • Tag
    • Timeline
    • Tooltip
    • Tour
      5.0.0
    • Tree
  • Feedback
    • Alert
    • Drawer
    • Message
    • Modal
    • Notification
    • Popconfirm
    • Progress
    • Result
    • Skeleton
    • Spin
    • Watermark
      5.1.0
  • Other
    • Affix
    • App
      5.1.0
    • ConfigProvider
    • Util
When To Use
Examples
Basic
Variant
Loading and Reversing
Alternate
Horizontal
Custom
End alternate
Title
Title Offset
Semantic Sample
Custom semantic dom styling
API
Timeline
Items
Semantic DOM
Timeline
Timeline Items
Design Token

Timeline

Vertical display timeline.
Importimport { Timeline } from "antd";
GitHub
components/timelineIssueOpen issues
Docs
Edit this page
contributors
TagTooltip

Resources

Ant Design X
Ant Design Charts
Ant Design Pro
Pro Components
Ant Design Mobile
Ant Design Mini
Ant Design Web3
Ant Design Landing-Landing Templates
Scaffolds-Scaffold Market
Umi-React Application Framework
dumi-Component doc generator
qiankun-Micro-Frontends Framework
Ant Motion-Motion Solution
China Mirror 🇨🇳

Community

Awesome Ant Design
Medium
X
yuque logoAnt Design in YuQue
Ant Design in Zhihu
Experience Cloud Blog
seeconf logoSEE Conf-Experience Tech Conference

Help

GitHub
Change Log
FAQ
Bug Report
Issues
Discussions
StackOverflow
SegmentFault

Ant XTech logoMore Products

yuque logoYuQue-Document Collaboration Platform
AntV logoAntV-Data Visualization
Egg logoEgg-Enterprise Node.js Framework
Kitchen logoKitchen-Sketch Toolkit
Galacean logoGalacean-Interactive Graphics Solution
WeaveFox logoWeaveFox-AI Development with WeaveFox 🦊
xtech logoAnt Financial Experience Tech
Theme Editor
Made with ❤ by
Ant Group and Ant Design Community
loading

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

API

Common props ref:Common props

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<LoadingOutlined />
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
number | string12
variantConfig style variantfilled | outlinedoutlined

Items

Node of timeline.

PropertyDescriptionTypeDefault
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-

Semantic DOM

Timeline

Timeline Items

Design Token

Component TokenHow to use?
Token NameDescriptionTypeDefault Value
dotBgBackground color of nodestring
dotBorderWidthBorder width of nodestring | number2
dotSizeNode sizestring | number
itemPaddingBottomBottom padding of itemnumber20
tailColorLine colorstringrgba(5,5,5,0.06)
tailWidthLine widthstring | number2
Global TokenHow to use?
Basic

Basic timeline.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Loading and Reversing

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

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Horizontal

Horizontal layout.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
End alternate

End alternate timeline.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Title Offset

Use titleSpan to set the title span space.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Custom semantic dom styling

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

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
6.0.0
Variant

Use the variant to set the style of the timeline.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Alternate

Alternate timeline.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Custom

Set a node as an icon or other custom element.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Title

Use title show time alone.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Semantic Sample

Achieve richer custom styles by using semantic structure.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
  1. Create a services site 2015-09-01
  2. Solve initial network problems 2015-09-01
  3. Technical testing 2015-09-01
  4. Network problems being solved 2015-09-01
  1. Create a services site 2015-09-01
  2. Solve initial network problems 2015-09-01
  3. Technical testing 2015-09-01
  4. Recording...
  1. Init
  2. Start
  3. Pending
  4. Complete
  1. Init
  2. Start
  3. Pending
  4. Complete
  1. Init
  2. Start
  3. Pending
  4. Complete
  1. Create a services site 2015-09-01
  2. Solve initial network problems 2015-09-01
  3. Technical testing 2015-09-01
  4. Network problems being solved 2015-09-01
titleSpan = 100px
  1. 05:10
    Create a services
  2. 09:03
    Solve initial network problems
  3. Technical testing
  4. 11:28
    Network problems being solved
titleSpan = 25%
  1. 05:10
    Create a services
  2. 09:03
    Solve initial network problems
  3. Technical testing
  4. 11:28
    Network problems being solved
titleSpan = 18, mode = end
  1. 05:10
    Create a services
  2. 09:03
    Solve initial network problems
  3. Technical testing
  4. 11:28
    Network problems being solved
  1. 2015-09-01
    Create a services site
  2. 2015-09-01 09:12:11
    Solve initial network problems
  3. Technical testing
  1. 2015-09-01
    Create a services site
  2. 2015-09-01 09:12:11
    Solve initial network problems
  3. Technical testing
  1. Create a services site 2015-09-01
  2. Solve initial network problems 2015-09-01
  3. Technical testing 2015-09-01
  4. Network problems being solved 2015-09-01
  1. Create a services site 2015-09-01
  2. Solve initial network problems 2015-09-01
  3. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
  4. Network problems being solved 2015-09-01
  5. Create a services site 2015-09-01
  6. Technical testing 2015-09-01
  1. Create a services site 2015-09-01
  2. Solve initial network problems 2015-09-01
  3. Technical testing 2015-09-01
  4. Network problems being solved 2015-09-01
  1. 2015-09-01
    Create a services
  2. 2015-09-01 09:12:11
    Solve initial network problems
  3. Technical testing
  4. 2015-09-01 09:12:11
    Network problems being solved
  1. Create a services site 2015-09-01
  2. Solve initial network problems 2015-09-01
  3. ...for a long time...
  4. Technical testing 2015-09-01
  5. Network problems being solved 2015-09-01
  1. 2015-09-01
    Create a services
  2. 2015-09-01 09:12:11
    Solve initial network problems
  3. Technical testing
  4. 2015-09-01 09:12:11
    Network problems being solved
  • root
    Root element with timeline container list style reset, vertical layout, dot icon, outlined style, alternate layout and other basic container styles
  • item
    Item element with single timeline node relative positioning, margin, padding, font size, finish state, color theme, layout direction and other node basic styles
  • itemWrapper
    Item wrapper element with timeline node content wrapping container styles
  • itemIcon
    Item icon element with node head icon absolute positioning, width/height size, background color, border, border radius, wave animation and other icon styles
  • itemSection
    Item section element with section container containing header and content flex layout, wrap, gap and other layout styles
  • itemHeader
    Item header element with header area layout containing title and rail, alignment, text direction and other styles
  • itemTitle
    Item title element with node title text font size, line height, color and other text styles
  • itemContent
    Item content element with node detail content relative positioning, top offset, left margin, text color, word break and other content styles
  • itemRail
    Item rail element with timeline node connection track line absolute positioning, top offset, left offset, height, border color, width, style and other connection line styles
  1. 2015-09-01 09:12:11
    Solve initial network problems
  2. 2015-09-01 11:11:11
    Technical testing
  • root
    Root element
  • wrapper
    Item wrapper element
  • icon
    Item icon element
  • section
    Item section element
  • header
    Item header element
  • title
    Item title element
  • content
    Item content element
  • rail
    Item rail element