ki-timeline-item
@kimen/elements/ki-timeline-item- Source
- Agent reference
Use ki-timeline-item as a direct child of
ki-timeline. Describe the event in the default
slot. Use text like “Preview deploy failed” to communicate status.
<ki-timeline label="Deployment activity"><ki-timeline-item tone="danger" datetime="2024-11-19T10:20:00Z" details-label="Build log"> Preview deploy failed <div slot="details">The runner timed out while compiling the web app.</div></ki-timeline-item></ki-timeline>Use an ISO date or date-time for datetime. Date-times from the past 24 hours
display relative minutes or hours. Older and future date-times display an
absolute date and time. A date-only value displays a calendar date.
Set tone to style the marker and icon-name to use a registered Lucide
glyph. Import each glyph you name. A decorative avatar in the start slot
replaces the icon and can repeat the identity in the event text.
import '@kimen/elements/icons/circle-alert';Put supplementary information in the details slot to show a collapsed
disclosure. Tab focuses its control, and Enter or Space opens or closes it.
Set details-label to describe the content or translate the default “Details”.
API reference
When to use: describe an activity, audit, or run event inside a ki-timeline.
When not to use: convey the outcome only through marker colour, or use the marker as a control. Put actions in the event content or details.
Properties & attributes
| Attribute | Property | Type | Default | Description |
|---|---|---|---|---|
datetime | datetime | string | undefined | – | ISO date or date-time. Invalid or missing dates have no time label. |
details-label | detailsLabel | string | undefined | 'Details' | Label of the details control when the details slot is populated. |
icon-name | iconName | string | undefined | – | Decorative Lucide icon name, registered by the caller's per-icon import. |
tone | tone | "danger" | "neutral" | "primary" | "success" | "warning" | 'neutral' | Marker tone. The event text carries the meaning. |
Slots
| Slot | Description |
|---|---|
| (default) | Event summary. Include important status information in the text. |
details | Additional event information in a native details disclosure. |
start | Decorative avatar or other noninteractive marker in place of the icon. |
CSS parts
| Part | Description |
|---|---|
content | Event summary, time and disclosure container. |
details | Native details disclosure. |
dot | Decorative event marker. |
summary | Keyboard-accessible details control. |
time | Native time element for a valid ISO date. |
CSS custom properties
The public styling contract of ki-timeline-item: reassign these tokens at :root or on a subtree — never override internals.
| Token | Description |
|---|---|
--ki-density-target-min | The smallest pointer target any density may produce: 24 x 24 CSS px by default and in compact (WCAG 2.5.8 AA), 44 x 44 in touch (WCAG 2.5.5). It floors a shrinking control but never lifts what a control paints: a control painted smaller extends its target to it, invisibly; rows and tabs grow to it (spec 045 A1). |
--ki-focus-ring-color | Colour of the keyboard focus ring every focusable component draws: 3:1 or more against the page in every theme and scheme. |
--ki-focus-ring-offset | Gap between a focusable component and its keyboard focus ring. |
--ki-focus-ring-width | Thickness of the keyboard focus ring every focusable component draws (its outline). One token instead of one per component, so a mode or a theme changes every ring at once. |
--ki-layout-spacing-xs | The xs spacing step for a stack or grid gap. |
--ki-layout-spacing-xxs | The xxs spacing step for a stack or grid gap. |
--ki-timeline-dot-backdrop-filter | Complete backdrop filter behind a timeline marker, off by default. |
--ki-timeline-dot-bg | Fill of the neutral timeline marker. |
--ki-timeline-dot-bg-image | Optional decorative image over the timeline marker fill. |
--ki-timeline-dot-danger-bg | Fill of the danger timeline marker. |
--ki-timeline-dot-danger-fg | Glyph color on the danger timeline marker. |
--ki-timeline-dot-fg | Glyph color on the neutral timeline marker. |
--ki-timeline-dot-icon-size | Size of the decorative glyph inside the timeline marker. |
--ki-timeline-dot-primary-bg | Fill of the primary timeline marker. |
--ki-timeline-dot-primary-fg | Glyph color on the primary timeline marker. |
--ki-timeline-dot-radius | Round corners of the timeline marker. |
--ki-timeline-dot-size | Diameter of the timeline marker. |
--ki-timeline-dot-success-bg | Fill of the success timeline marker. |
--ki-timeline-dot-success-fg | Glyph color on the success timeline marker. |
--ki-timeline-dot-warning-bg | Fill of the warning timeline marker. |
--ki-timeline-dot-warning-fg | Glyph color on the warning timeline marker. |
--ki-timeline-gap | Space between marker and text and between timeline entries. |
--ki-timeline-item-fg | Text color of the event summary and details. |
--ki-timeline-line-width | Hairline width of the timeline connector. |
--ki-timeline-time-bg | The timestamp shows the surrounding surface through its transparent background. |
--ki-timeline-time-fg | Text color of the timeline timestamp. |
--ki-typography-family-body | semantic font family for typography family body. |
--ki-typography-line-height-caption-2 | semantic dimension for typography line height caption 2. |
--ki-typography-line-height-para | semantic dimension for typography line height para. |
--ki-typography-size-body-1 | semantic dimension for typography size body 1. |
--ki-typography-size-caption-2 | semantic dimension for typography size caption 2. |