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.

Aperçu

Rendu de l’aperçu en cours…

vertical 3 items

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et 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

Emplacements de contenu exposés par ce composant.

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

API

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

<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.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

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

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Rôles ARIA

list
listitem (per item)

Interactions clavier

Interactions clavier
ToucheAction
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.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

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.

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Basic vertical timeline

vue

Alternating layout

vue

Horizontal scroll-snap

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.