Importimport { Timeline } from 'antd'; |
contributors
Common props ref:Common props
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
| classNames | Customize class for each semantic structure inside the component. Supports object or function. | Record<SemanticDOM, string> | (info: { props })=> Record<SemanticDOM, string> | - | |
| items | Each node of timeline | Items[] | - | |
| mode | By sending alternate the timeline will distribute the nodes to the left and right | start | alternate | end | start | |
| orientation | Set the direction of the timeline | vertical | horizontal | vertical | |
Set the last ghost node's existence or its content. Use item.loading instead | ReactNode | false | ||
Set the dot of the last ghost node when pending is true. Use item.icon instead | ReactNode | <LoadingOutlined /> | ||
| reverse | Whether reverse nodes or not | boolean | false | |
| styles | Customize inline style for each semantic structure inside the component. Supports object or function. | Record<SemanticDOM, CSSProperties> | (info: { props })=> Record<SemanticDOM, CSSProperties> | - | |
| titleSpan | Set the title span space. It is the distance to the center of the dot | number | string | 12 | |
| variant | Config style variant | filled | outlined | outlined |
Node of timeline.
| Property | Description | Type | Default |
|---|---|---|---|
| color | Set the circle's color to blue, red, green, gray or other custom colors | string | blue |
| content | Set the content | ReactNode | - |
Set the content. Please use content instead | ReactNode | - | |
Customize timeline dot. Please use icon instead | ReactNode | - | |
| icon | Customize node icon | ReactNode | - |
Set the label. Please use title instead | ReactNode | - | |
| loading | Set loading state | boolean | false |
| placement | Customize node placement | start | end | - |
Customize node position. Please use placement instead | start | end | - | |
| title | Set the title | ReactNode | - |
| Token Name | Description | Type | Default Value |
|---|---|---|---|
| dotBg | Background color of node | string | |
| dotBorderWidth | Border width of node | string | number | 2 |
| dotSize | Node size | string | number | |
| itemPaddingBottom | Bottom padding of item | number | 20 |
| tailColor | Line color | string | rgba(5,5,5,0.06) |
| tailWidth | Line width | string | number | 2 |
| Token Name | Description | Type | Default Value |
|---|---|---|---|
| colorError | Used to represent the visual elements of the operation failure, such as the error Button, error Result component, etc. | string | #ff4d4f |
| colorPrimary | Brand color is one of the most direct visual elements to reflect the characteristics and communication of the product. After you have selected the brand color, we will automatically generate a complete color palette and assign it effective design semantics. | string | #1677ff |
| colorSuccess | Used to represent the token sequence of operation success, such as Result, Progress and other components will use these map tokens. | string | #52c41a |
| colorText | Default text color which comply with W3C standards, and this color is also the darkest neutral color. | string | rgba(0,0,0,0.88) |
| colorTextDisabled | Control the color of text in disabled state. | string | rgba(0,0,0,0.25) |
| fontFamily | The font family of Ant Design prioritizes the default interface font of the system, and provides a set of alternative font libraries that are suitable for screen display to maintain the readability and readability of the font under different platforms and browsers, reflecting the friendly, stable and professional characteristics. | string | -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' |
| fontSize | The most widely used font size in the design system, from which the text gradient will be derived. | number | 14 |
| lineHeight | Line height of text. | number | 1.5714285714285714 |
| margin | Control the margin of an element, with a medium size. | number | 16 |
| paddingXS | Control the extra small padding of the element. | number | 8 |
| paddingXXS | Control the extra extra small padding of the element. | number | 4 |