Skip to content

sv-timeline-item

sv-timeline-item is one event in an sv-timeline, shown as a marker on the line beside its title.

Usage

An item works only inside an sv-timeline.

<sv-timeline-item variant="error">
<time slot="opposite" datetime="2026-03-31">Mar 31</time>
Delivery failed
<span slot="description">Nobody was home</span>
</sv-timeline-item>

For a marker color that variant does not have, set --sv-timeline-marker-bg on the item.

Structure

divopposite
slotopposite
divmarker
sloticon
divline
divcontent
slotdefault
divdescription
slotdescription

API References

Attributes

"side"

The side of the line that holds the content. It overrides placement of the timeline.

"variant"

Colors the marker and its icon with a theme color. It overrides the marker color tokens.

"outlined"

Shows a hollow marker.

"heading"

Shows the item as a section heading, with no marker, line, opposite, or icon. alternate skips a heading when it counts the items.

"hidden"

The native hidden attribute. A hidden item is left out of alternate, and the item before it ends the line. An item hidden by your own CSS still counts for both.

Slots

opposite

The content on the other side of the line, like a date.

icon

An icon or an avatar in a marker that is --sv-timeline-marker-sz wide.

Default

The title of the event.

description

The text under the content.

CSS Properties

--sv-timeline-marker-sz

Size of the marker of an item with an icon.

--sv-timeline-dot-sz

Size of the marker of an item with no icon.

--sv-timeline-ln-clr

Color of the line.

--sv-timeline-ln-style

Style of the line, like dashed or dotted.

--sv-timeline-opposite-clr

Text color of the content on the other side of the line.

--sv-timeline-description-clr

Text color of the description.

--sv-timeline-marker-bg

Background color of the marker, and the color of the ring and icon of an outlined marker.

--sv-timeline-marker-clr

Color of the icon in a filled marker.

CSS Parts

::part(opposite)

The box on the other side of the line.

::part(marker)

The dot, or the circle that holds the icon.

::part(line)

The line to the next item.

::part(content)

The box that holds the content and the description.

::part(description)

The text under the content.