TimelineItem
Individual event entry inside an OrigamTimeline — renders a dot, connector and content area with optional title, subtitle, body, icon and intent.
Structure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<origam-timeline-item> — 7 internal parts. The track holds the dot and connector; the content area holds the header (title + subtitle) and the body.- 1.origam-timeline-item
- Root element.
role="listitem", flex row. Orientation modifier class switches to flex-column in horizontal mode. - 2.origam-timeline-item__track
- Track column: contains the dot and connector, flex-column, fixed width. In horizontal mode switches to flex-row.
- 3.origam-timeline-item__dot
- Colored dot circle. Background and foreground color driven by the resolved intent via CSS custom properties.
- 4.origam-timeline-item__connector
- Connector line between dots. Hidden when
isLast=trueandtruncateLine=true. - 5.origam-timeline-item__content
- Content area, flex: 1. Hosts the header and body sub-elements or the entire default slot.
- 6.origam-timeline-item__header
- Header row containing title and subtitle spans. Visible only when default slot is not used.
- 7.origam-timeline-item__body
- Body text area. Rendered when description prop or the body slot is provided.
API
Props
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.
- titlestring
- Primary label rendered in the item header. Can also be provided via the default slot.
- subtitlestring
- Secondary label rendered below the title in the item header.
- descriptionstring
- Body text rendered in the item body area. Overridden by the body slot.
- icon
- Icon rendered inside the dot. Overridden by the dot slot.
- intent
- Semantic intent that sets the dot background and foreground color. Falls back to the parent OrigamTimeline color.
- isLastbooleanfalse
- Marks this item as the last entry. Hides the trailing connector when truncateLine=true.
- truncateLinebooleanfalse
- When true and isLast=true, the connector line after the last dot is hidden.
- sideTTimelineSide'start'
- Which side of the track the content appears. Overridden by the parent OrigamTimeline side prop via inject.
- orientationTTimelineOrientation'vertical'
- Layout direction. Normally injected by the parent OrigamTimeline — items rarely set this directly.
- indexnumber0
- Zero-based position index in the timeline. Used to determine the content side when side="alternating".
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- colorTColor
- densityTDensity
- sizeTSize | number
API
Slots
Emplacements de contenu exposés par ce composant.
- #dot
- Replaces the dot content. By default renders an OrigamIcon when icon is provided.
- #default
- Replaces the entire header (title + subtitle) and body area. Use for fully custom item content.
- #body
- Replaces the body text area. Falls back to the description prop.
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 the track and the content area.
- Fixed width of the track column (holds dot + connector).
- Diameter of the timeline dot circle.
- Per-item dot background color. Set via intent-resolved CSS custom property on the dot element style.
- Per-item dot foreground (icon) color. Set via intent-resolved CSS custom property.
- Border width of the dot circle (separates dot from background).
- Color of the connector line between dots.
- Thickness of the connector line.
- Font size of the item title text.
- Font weight of the item title text.
- Font size of the 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
Notes
- OrigamTimelineItem uses role="listitem" matching the parent OrigamTimeline role="list". The track area (dot + connector) is aria-hidden="true" — it is decorative.
- Icons inside the dot are decorative and aria-hidden by the parent track. If the icon conveys status, provide the information via title or description for screen readers.
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.
- dimensionvar(--origam-space---3)
- Diameter of the timeline dot.
- colorvar(--origam-color__action--primary---bg)
- Default dot background color (overridden per-item by intent).
- colorvar(--origam-color__border---subtle)
- Connector line color.
- dimensionvar(--origam-border__width---thin)
- Connector line thickness.
- fontWeightvar(--origam-font__weight---semibold)
- Font weight of the item title.
- colorvar(--origam-color__text---secondary)
- Color of subtitle and body text.
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 timeline items
Custom dot slot
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.