Data
Timeline
Events on an axis, down the page or across it, with content on one side, the other, or alternating.
WAI-ARIA tested
Import
main.ts
import { Timeline } from '@vitral/vue';Opposite content
- 15/10/2026 10:30Ordered
- 15/10/2026 14:00Processing
- 16/10/2026 16:15Shipped
- 18/10/2026 10:00Delivered
Alternate, with icons
- Ordered15/10/2026 10:30
- Processing15/10/2026 14:00
- Shipped16/10/2026 16:15
- Delivered18/10/2026 10:00
Horizontal
- Ordered
- Processing
- Shipped
- Delivered
API
Read from packages/vue/src/components/Timeline/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| value | any[] | The events, in order. |
| align | 'left' | 'right' | 'alternate' | 'top' | 'bottom' | Which side the content is on: `left`, `right` or `alternate` vertically; `top`, `bottom` or `alternate` horizontally. |
| layout | 'vertical' | 'horizontal' | Events down the page (the default) or across it. |
| dataKey | string | A field that identifies an event. |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Slots
| Name | Slot props | Description |
|---|---|---|
| content | (props: { item: unknown; index: number }) | An event's content. |
| opposite | (props: { item: unknown; index: number }) | What sits across the axis from the content: a date, say. |
| marker | (props: { item: unknown; index: number }) | Replaces the marker. |
| connector | (props: { item: unknown; index: number }) | Replaces the line to the next event. |