Skip to content

Types

TimelineGroup

TimelineGroups are the rows in the timeline with items.

OptionTypeDefaultDescription
idstringrequiredUnique ID, to bind items to
labelstringundefinedGroup label
classNamestring''CSS class(es)
contentstringundefinedGroup label removed in v2.0.0
cssVariablesRecord<string, string>{}CSS variables to apply to the group (e.g. { '--height': '20%' })

TimelineItem

TimelineItems can be points, ranges, backgrounds or markers. They are assigned to a group by their group property.

OptionTypeDefaultDescription
idstringundefinedUnique ID, to match with activeItems prop
startnumberrequiredTimestamp
groupstringundefinedid of the TimelineGroup to assign the item to
endnumberrequired for range and backgroundTimestamp, only used for type range and background
classNamestring''CSS class(es)
typestringrequiredType of item, one of: point, range, background or marker
cssVariablesRecord<string, string>{}CSS variables to apply to the item (e.g. { '--height': '20%' })

TimelineMarker

To improve performance, you can add markers as an individual prop, instead of together with items. This allows you to update the position of a marker (e.g. to show the current time) while keeping the rest of the items cached.

OptionTypeDefaultDescription
idstringundefinedUnique ID, to match with activeItems prop
startnumberrequiredTimestamp
classNamestring''CSS class(es)
typestringrequiredmarker
cssVariablesRecord<string, string>{}CSS variables to apply to the item (e.g. { '--height': '20%' })