Playground

Timeline

A vertical list of events with times, joined by a rule.

  • Built on native elements
  • 2 parts, named exports
  • An ordered list of events; the time is a real time element when a datetime is given.
  • Styles in one file: timeline.css

Import

import '@monoline/css';
import {Timeline} from '@monoline/react';

Not installed yet? Pick a route.

Copies the source and its styles into your project.

npx monoline add timeline

Usage

import {Timeline, TimelineItem} from '@monoline/react';

<Timeline aria-label="Activity">
  <TimelineItem title="Project created" time="3 days ago" dateTime="2026-11-09">Ada started the project.</TimelineItem>
  <TimelineItem title="First release" time="Yesterday" dateTime="2026-11-11" />
  <TimelineItem title="Public" time="Today" dateTime="2026-11-12" />
</Timeline>

Anatomy

Import the parts you need and nest them like this.

import {Timeline, TimelineItem} from '@monoline/react';

<Timeline>
  <TimelineItem />
</Timeline>

Examples

Activity

Props

TimelineItemProps

PropTypeDefaultDescription
title requiredReactNode–What happened, shown as the entry's heading line.
timeReactNode–Human text for when it happened, such as "2 days ago".
dateTimestring–Machine-readable date for the time element.

Data Attributes

State is exposed through attributes. Style it with these selectors, not with class toggles.

This component sets no state attributes.

CSS classes

ClassStylesheet
.timelinetimeline.css
.timeline-bodytimeline.css
.timeline-itemtimeline.css
.timeline-timetimeline.css
.timeline-titletimeline.css

Customization

Style it with the kit's tokens in your own CSS, loaded after @monoline/css. Prefer the attributes above over extra classes. See Theming for every token.

app.css
.timeline {
  border-color: var(--accent);
}

Accessibility

  • An ordered list of events; the time is a real time element when a datetime is given.