Timeline

Data Display
stable

Vertical or horizontal event timeline with dot, connector and item content slots. Supports alternating layout, custom intents per item, and scroll-snapping in horizontal mode.

Preview

Rendering the live preview…

vertical 3 items

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamTimelineSchematic of the Timeline component with 5 numbered internal parts. Account created Profile completed First payment 1 2 3 4 origam-timeline
Anatomy of <origam-timeline> — 4 internal parts: root list ①, dot ②, connector ③ and content area ④ per item.
1.origam-timeline
Root element with role="list". Contains a track-wrapper div in horizontal mode.
2.origam-timeline-item__dot
Circular dot. Background color driven by the item intent via --origam-timeline-item---dot-bg. Hosts the #dot slot (icon by default when icon prop is set).
3.origam-timeline-item__connector
Vertical (or horizontal) line connecting consecutive dots. Hidden on the last item when truncateLine=true.
4.origam-timeline-item__content
Content area next to the dot. Contains the header (title + subtitle) and an optional body. Hosts the #default and #body slots.

API

Props

All props accepted by this component, with their type, default value and description.

items
ITimelineEntry[]
Array of timeline entries. Each entry has title, subtitle, description, icon and intent. When provided, OrigamTimelineItem is rendered automatically.
orientation
'vertical'
Layout direction. 'vertical' (default): dots stacked top→bottom. 'horizontal': dots in a scroll-snapping row, content below.
side
TTimelineSide
'start'
Which side the content appears on in vertical mode. 'alternating' places odd items on the start side and even items on the end side.
truncateLine
boolean
false
When true, the connector line is hidden on the last item (no trailing connector).
ariaLabel
string
aria-label for the timeline list root (role="list").
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
tag
string
'div'
HTML element rendered at root.
color
Default intent color for dots when no per-item intent is set.
size
'default'
Dot size token. Overrides the --origam-timeline---dot-size token.
density
'default'
Adjusts the gap between items.

API

Slots

Content slots exposed by this component.

#default
Slot for manual OrigamTimelineItem children. Overrides the items prop. Use when you need per-item slot customisation.

API

Exposed members

Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to a child component.
Ref<string>
Reactive CSS string generated by useStyle.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet into the document.
() => void
Removes the injected style sheet.
Ref<boolean>
True once the style sheet has been injected into the DOM.

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

Gap between timeline items and between the dot and content.
Diameter of the dot.
Default dot background color (overridden per item by intent).
Default dot foreground (icon) color.
Color of the connector line between dots.
Width/height of the connector line.
Width of the track column (dot + connector area).
Font size of the item title.
Color of the item subtitle and body text.

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

ARIA roles

list
listitem (per item)

Keyboard interactions

Keyboard interactions
KeyAction
TabMoves focus between interactive elements inside the timeline items (links, buttons in content slots).

Notes

  • The root element has role="list". Each OrigamTimelineItem has role="listitem". Screen readers announce the number of items in the timeline.
  • Provide an ariaLabel prop to describe the timeline purpose (e.g. "Project history"). Without it, screen readers will not contextualise the list.
  • The track column (dot + connector) has aria-hidden="true" — it is decorative. Meaningful content lives in the content area.

Foundation

Design tokens

Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.

Source
dimension
var(--origam-space---4)
Gap between items.
dimension
var(--origam-space---3)
Dot diameter.
color
var(--origam-color__action--primary---bg)
Default dot background color.
color
var(--origam-color__border---subtle)
Connector line color.
dimension
var(--origam-border__width---thin)
Connector line width.
fontWeight
var(--origam-font__weight---semibold)
Title font weight.

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Basic vertical timeline

vue

Alternating layout

vue

Horizontal scroll-snap

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.