Timeline
A list that shows events in time order.
Usage
Basic
color sets each dot's semantic tone.
Loading demo...
Admin Audit Flow
In a permission orchestration panel, the timeline records authorization steps and active marks the current one.
Loading demo...
Best Practices
- Put the status in
titleor the slot text; usecoloronly as reinforcement. - Mark exactly one current event
activein a step-by-step flow. - Use
layout="horizontal"for short milestone sequences; keep audit logs and long histories vertical. - Keep
timeshort and consistently formatted within one timeline. - In dense timelines, give an
icononly to exceptional or key states.
API Reference
TxTimeline
Props
| Property | Type | Default | Description |
|---|---|---|---|
| layout | Layout direction, shared with every item. |
Slots
| Slot | Props | Description |
|---|---|---|
default | - | Timeline items. |
TxTimelineItem
Props
| Property | Type | Default | Description |
|---|---|---|---|
| title | - | Item title. | |
| time | - | Time label. | |
| color | Semantic tone of the dot. | ||
| icon | - | Dot icon. | |
| active | Highlights the current event's item and dot. |
Slots
| Slot | Props | Description |
|---|---|---|
default | - | Event description below the title and time. |
Overview
TxTimelineis arole="list", and eachTxTimelineItemarole="listitem".layoutreaches the items through provide / inject, so items never set it themselves.- The dot and its icon are
aria-hidden; screen readers get only the title, time, and description.
Technologies
- Source:
packages/tuffex/packages/components/src/timeline/.
查看源码
packages/tuffex/packages/components/src/timeline/index.ts