Timeline
A flowing information display component connected by a main line, suitable for building enterprise milestones, version release logs, and task approval progress flows.
Demo
垂直时间线 — 所有 Dot 变体
默认白底黑字圆点样式。
珊瑚红主色圆点样式。
薄荷青辅助色方形样式。
黄色强调色菱形样式。
绿色成功色圆点样式。
红色危险色圆点样式。
水平时间线
垂直交替布局 — alternate
确定产品方向与核心目标。
完成视觉设计与首轮开发。
回归测试与性能调优。
面向全量用户开放。
Installation
pnpm dlx brutx-vue@latest add timelineUsage
<script setup>
import {
Timeline,
TimelineItem,
TimelineSeparator,
TimelineDot,
TimelineConnector,
TimelineContent
} from 'brutx-ui-vue'
</script>
<template>
<Timeline orientation="vertical">
<!-- Node 1 -->
<TimelineItem>
<TimelineSeparator>
<TimelineDot variant="primary" shape="circle">1</TimelineDot>
<TimelineConnector />
</TimelineSeparator>
<TimelineContent class="pl-2">
<div class="font-black">Phase One</div>
<p class="font-normal text-sm mt-1">Description of Phase One goes here.</p>
</TimelineContent>
</TimelineItem>
<!-- Node 2 -->
<TimelineItem>
<TimelineSeparator>
<TimelineDot variant="accent" shape="square">2</TimelineDot>
</TimelineSeparator>
<TimelineContent class="pl-2">
<div class="font-black">Phase Two</div>
<p class="font-normal text-sm mt-1">Description of Phase Two goes here.</p>
</TimelineContent>
</TimelineItem>
</Timeline>
</template>Horizontal Timeline
Set orientation="horizontal" to switch to horizontal layout. In horizontal mode, it is recommended to add text-center on TimelineContent to align text with the icon:
<template>
<Timeline orientation="horizontal">
<TimelineItem>
<TimelineSeparator>
<TimelineDot variant="primary" shape="circle">1</TimelineDot>
<TimelineConnector />
</TimelineSeparator>
<TimelineContent class="text-center">
<div class="font-black text-sm">Requirements</div>
<div class="text-xs text-brutal-fg/60 mt-1">2026-06-01</div>
</TimelineContent>
</TimelineItem>
<TimelineItem>
<TimelineSeparator>
<TimelineDot variant="accent" shape="square">2</TimelineDot>
<TimelineConnector />
</TimelineSeparator>
<TimelineContent class="text-center">
<div class="font-black text-sm">Design & Dev</div>
<div class="text-xs text-brutal-fg/60 mt-1">2026-06-15</div>
</TimelineContent>
</TimelineItem>
<TimelineItem>
<TimelineSeparator>
<TimelineDot variant="success" shape="circle">3</TimelineDot>
</TimelineSeparator>
<TimelineContent class="text-center">
<div class="font-black text-sm">Test & Release</div>
<div class="text-xs text-brutal-fg/60 mt-1">2026-07-01</div>
</TimelineContent>
</TimelineItem>
</Timeline>
</template>Alternate Layout
Set the alternate property to true to alternate the vertical timeline content along the separator line: even-indexed items (0, 2, 4...) display content on the left, odd-indexed items (1, 3, 5...) display content on the right, creating a symmetrical alternating rhythm. This property only takes effect when orientation="vertical"; in horizontal mode, it is automatically ignored.
<template>
<Timeline orientation="vertical" alternate>
<TimelineItem>
<TimelineSeparator>
<TimelineDot variant="primary" shape="circle">1</TimelineDot>
<TimelineConnector />
</TimelineSeparator>
<TimelineContent class="pl-2">
<div class="font-black text-base">Project Kickoff</div>
<p class="text-sm text-brutal-fg/80 mt-1 font-normal">Define product direction and core objectives.</p>
</TimelineContent>
</TimelineItem>
<TimelineItem>
<TimelineSeparator>
<TimelineDot variant="accent" shape="square">2</TimelineDot>
<TimelineConnector />
</TimelineSeparator>
<TimelineContent class="pl-2">
<div class="font-black text-base">Design & Development</div>
<p class="text-sm text-brutal-fg/80 mt-1 font-normal">Complete visual design and first round of development.</p>
</TimelineContent>
</TimelineItem>
<TimelineItem>
<TimelineSeparator>
<TimelineDot variant="success" shape="diamond">3</TimelineDot>
<TimelineConnector />
</TimelineSeparator>
<TimelineContent class="pl-2">
<div class="font-black text-base">Testing & Acceptance</div>
<p class="text-sm text-brutal-fg/80 mt-1 font-normal">Regression testing and performance tuning.</p>
</TimelineContent>
</TimelineItem>
<TimelineItem>
<TimelineSeparator>
<TimelineDot variant="danger" shape="circle">4</TimelineDot>
</TimelineSeparator>
<TimelineContent class="pl-2">
<div class="font-black text-base">Official Release</div>
<p class="text-sm text-brutal-fg/80 mt-1 font-normal">Available to all users.</p>
</TimelineContent>
</TimelineItem>
</Timeline>
</template>Note
The alternate layout index is automatically injected by Timeline starting from 0 based on the order of TimelineItem elements; no manual specification is needed. When alternate and horizontal are set simultaneously, horizontal mode takes precedence and alternate has no effect.
Variants
TimelineDot supports diverse neo-brutalist geometric designs and color themes, customizable via shape and variant:
Shape (shape)
| Shape | Description |
|---|---|
circle | Classic circular badge |
square | Bold, angular card shape |
diamond | Diamond rotated 45 degrees (text slot content is automatically counter-rotated internally to prevent tilted typography) |
Color (variant)
| Variant | Description |
|---|---|
default | Default color scheme |
primary | Primary color |
secondary | Secondary color |
accent | Accent color |
success | Success color |
danger | Danger color |
Sub-components
| Component | Description |
|---|---|
Timeline | Root container, manages layout direction and alternate arrangement |
TimelineItem | Single time node |
TimelineSeparator | Node separator area, contains Dot and Connector |
TimelineDot | Node badge, supports shape and color variants |
TimelineConnector | Connector line between nodes |
TimelineContent | Node content area |
API Reference
Timeline
| Name | Type | Default | Description |
|---|---|---|---|
orientation | TimelineOrientation | undefined | "vertical" | Sets the timeline to vertical or horizontal layout; horizontal timelines can scroll horizontally. |
DetailsDeclared typeTimelineOrientation | undefined Literal values
Referenced types TimelineOrientation Type definition — TimelineOrientationexport type TimelineOrientation = 'vertical' | 'horizontal' Default value details
Sourcepackages/ui/src/components/timeline/Timeline.vue | |||
alternate | boolean | undefined | false | Alternates adjacent item content on opposite sides of the axis in vertical orientation. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/timeline/Timeline.vue | |||
class | string | undefined | undefined | Custom CSS classes added to the outer timeline list container. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/timeline/Timeline.vue | |||
TimelineConnector
| Name | Type | Default | Description |
|---|---|---|---|
class | string | undefined | undefined | Custom CSS classes added to the timeline connector element. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/timeline/TimelineConnector.vue | |||
TimelineContent
| Name | Type | Default | Description |
|---|---|---|---|
class | string | undefined | undefined | Custom CSS classes added to the timeline item content area. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/timeline/TimelineContent.vue | |||
| Name | Signature or type | Description |
|---|---|---|
#default | {} | Renders the main content for the current timeline item. |
DetailsDeclared type{}Sourcepackages/ui/src/components/timeline/TimelineContent.vue | ||
TimelineDot
| Name | Type | Default | Description |
|---|---|---|---|
variant | "accent" | "danger" | "default" | "primary" | "secondary" | "success" | undefined | "accent" | Sets the color variant of the timeline marker. |
DetailsDeclared typeNonNullable<"default" | "primary" | "secondary" | "success" | "danger" | "accent" | null | undefined> | undefined Literal values
Default value details
Sourcepackages/ui/src/components/timeline/TimelineDot.vue | |||
shape | "circle" | "diamond" | "square" | undefined | "circle" | Sets the timeline marker to a circle, square, or diamond. |
DetailsDeclared typeNonNullable<"square" | "circle" | "diamond" | null | undefined> | undefined Literal values
Default value details
Sourcepackages/ui/src/components/timeline/TimelineDot.vue | |||
led | boolean | undefined | false | Enables a decorative LED pulse glow; the animation respects reduced-motion preferences. |
DetailsDeclared typeboolean | undefined Literal values
Default value details
Sourcepackages/ui/src/components/timeline/TimelineDot.vue | |||
class | string | undefined | undefined | Custom CSS classes added to the timeline marker element. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/timeline/TimelineDot.vue | |||
| Name | Signature or type | Description |
|---|---|---|
#default | {} | Displays content such as a number or icon inside the timeline marker. |
DetailsDeclared type{}Sourcepackages/ui/src/components/timeline/TimelineDot.vue | ||
TimelineItem
| Name | Type | Default | Description |
|---|---|---|---|
index | number | undefined | undefined | The item index. Timeline injects it in order for direct children, and an explicit value overrides the injected index. |
DetailsDeclared typenumber | undefined Default value details
Sourcepackages/ui/src/components/timeline/TimelineItem.vue | |||
class | string | undefined | undefined | Custom CSS classes added to the individual timeline item container. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/timeline/TimelineItem.vue | |||
| Name | Signature or type | Description |
|---|---|---|
#default | {} | Composes the TimelineSeparator and TimelineContent for this item. |
DetailsDeclared type{}Sourcepackages/ui/src/components/timeline/TimelineItem.vue | ||
TimelineSeparator
| Name | Type | Default | Description |
|---|---|---|---|
class | string | undefined | undefined | Custom CSS classes added to the separator area containing the axis and marker. |
DetailsDeclared typestring | undefined Default value details
Sourcepackages/ui/src/components/timeline/TimelineSeparator.vue | |||
| Name | Signature or type | Description |
|---|---|---|
#default | {} | Contains the TimelineDot and TimelineConnector. |
DetailsDeclared type{}Sourcepackages/ui/src/components/timeline/TimelineSeparator.vue | ||
Accessibility
- Semantic Structure: The timeline uses list structure (
<ol>/<li>) to organize nodes, making it easy for screen readers to understand content order - ARIA Attributes: The root container sets
role="list", each node setsrole="listitem", providing clear list semantics - Layout Direction: The
orientationproperty automatically setsaria-orientationto inform assistive technologies of the current layout direction - Content Hierarchy: Content in
TimelineDot(such as numbers, icons) should be accompanied by text descriptions to ensure complete information delivery