Skip to content
Kimenpre-v1documentation home
Color scheme

ki-timeline-item

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.

Theme for this example
Color scheme for this example
Preview deploy failed
The runner timed out while compiling the web app.
<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

AttributePropertyTypeDefaultDescription
datetimedatetimestring | undefined–ISO date or date-time. Invalid or missing dates have no time label.
details-labeldetailsLabelstring | undefined'Details'Label of the details control when the details slot is populated.
icon-nameiconNamestring | undefined–Decorative Lucide icon name, registered by the caller's per-icon import.
tonetone"danger" | "neutral" | "primary" | "success" | "warning"'neutral'Marker tone. The event text carries the meaning.

Slots

SlotDescription
(default)Event summary. Include important status information in the text.
detailsAdditional event information in a native details disclosure.
startDecorative avatar or other noninteractive marker in place of the icon.

CSS parts

PartDescription
contentEvent summary, time and disclosure container.
detailsNative details disclosure.
dotDecorative event marker.
summaryKeyboard-accessible details control.
timeNative 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.

TokenDescription
--ki-density-target-minThe 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-colorColour of the keyboard focus ring every focusable component draws: 3:1 or more against the page in every theme and scheme.
--ki-focus-ring-offsetGap between a focusable component and its keyboard focus ring.
--ki-focus-ring-widthThickness 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-xsThe xs spacing step for a stack or grid gap.
--ki-layout-spacing-xxsThe xxs spacing step for a stack or grid gap.
--ki-timeline-dot-backdrop-filterComplete backdrop filter behind a timeline marker, off by default.
--ki-timeline-dot-bgFill of the neutral timeline marker.
--ki-timeline-dot-bg-imageOptional decorative image over the timeline marker fill.
--ki-timeline-dot-danger-bgFill of the danger timeline marker.
--ki-timeline-dot-danger-fgGlyph color on the danger timeline marker.
--ki-timeline-dot-fgGlyph color on the neutral timeline marker.
--ki-timeline-dot-icon-sizeSize of the decorative glyph inside the timeline marker.
--ki-timeline-dot-primary-bgFill of the primary timeline marker.
--ki-timeline-dot-primary-fgGlyph color on the primary timeline marker.
--ki-timeline-dot-radiusRound corners of the timeline marker.
--ki-timeline-dot-sizeDiameter of the timeline marker.
--ki-timeline-dot-success-bgFill of the success timeline marker.
--ki-timeline-dot-success-fgGlyph color on the success timeline marker.
--ki-timeline-dot-warning-bgFill of the warning timeline marker.
--ki-timeline-dot-warning-fgGlyph color on the warning timeline marker.
--ki-timeline-gapSpace between marker and text and between timeline entries.
--ki-timeline-item-fgText color of the event summary and details.
--ki-timeline-line-widthHairline width of the timeline connector.
--ki-timeline-time-bgThe timestamp shows the surrounding surface through its transparent background.
--ki-timeline-time-fgText color of the timeline timestamp.
--ki-typography-family-bodysemantic font family for typography family body.
--ki-typography-line-height-caption-2semantic dimension for typography line height caption 2.
--ki-typography-line-height-parasemantic dimension for typography line height para.
--ki-typography-size-body-1semantic dimension for typography size body 1.
--ki-typography-size-caption-2semantic dimension for typography size caption 2.

Open ki-timeline-item in Storybook