Timeline
The mock's .tl: an <ol> in the order given (the server sorts), a rail at 8px, 12px dots with a white ring. Title, time and detail are the app's words: each is isolated in its own script's direction (B15).
import { Timeline } from '@ergasti/bricks';Examples
Activity
Dated events with a coloured dot, a title and an optional detail line.
Code
import { Card, Timeline } from '@ergasti/bricks';
function Events() {
return (
<div style={{ maxWidth: 520 }}>
<Card>
<Timeline
events={[
{ id: 1, tone: 'ok', title: 'TRNDR team approved Karim Hosny’s join request', at: '2 hours ago · 13 Nov 2026 11:20', detail: 'Coupon KARI0329 created.' },
{ id: 2, tone: 'bad', title: 'TRNDR team rejected your challenge request Ramadan preview', at: '5 hours ago · 13 Nov 2026 08:02', detail: 'Reason: dates overlap with Winter glow launch.' },
{ id: 3, tone: 'rasp', title: 'You requested the challenge Lip oil bundle push', at: 'Yesterday · 12 Nov 2026 16:45' },
]}
/>
</Card>
</div>
);
}Props
Prop
Type
Design guidance
How the BRICKS design system uses Timeline. Written in docs/content/components/Timeline.md; the props above are read from the code, which wins where the two disagree.
A vertical, read-only event list with a rail and coloured dots, each event with a title, a time and an optional detail box; use it for a short history (a fraud case, a shipment) where events are not clickable.
It is the mock's .tl: an ordered list in the order the server gives, a 2px rail 8px in from the start, 12px dots with a white ring coloured by tone. Title, time and detail are app words, each isolated in its own script's direction. When each event must open something, use ActivityLog, which adds an open action, loading and empty states.
Anatomy
- List:
ol.kit-tl, padding-inline-start 28px;::beforeis the--linerail. - Event:
li.kit-tl-ev, padding 4px 0 18px;::beforeis the dot, colour from--c. - Title: first line.
- Time:
.kit-mutedline ("Today, 09:14"). - Detail (optional):
.kit-tl-d,--softbox, radius 12, 13px--ink-2, 8px under.
Variants
tone | Dot colour | When to use |
|---|---|---|
ok | --ok | Approved, paid, delivered. |
bad | --bad | Rejected, failed, flagged. |
rasp | --rasp | Brand actions, neutral highlights. |
sky | --sky-ink | Information, messages. |
butter | --butter-ink | Waiting, paused. |
States
| State | Trigger |
|---|---|
| Events | events non-empty. |
| One event | the rail spans the single row. |
| Empty | events=[] renders an empty list; show your own empty text instead. |
| With detail | detail adds the soft box. |
Types
TimelineEvent: id: string | number (key), tone: 'ok' | 'bad' | 'rasp' | 'sky' | 'butter', title: ReactNode, at: ReactNode, detail?: ReactNode.
Usage
<Card title="Case history">
<Timeline events={[
{ id: 1, tone: 'bad', title: 'Flagged: 14 orders from one address', at: 'Today, 09:14' },
{ id: 2, tone: 'sky', title: 'Creator asked for a review', at: 'Today, 11:02', detail: '"These are my family orders, all real."' },
{ id: 3, tone: 'ok', title: 'Cleared by Mona from TRNDR', at: 'Today, 15:40' },
]} />
</Card>// Empty state handled by the caller
{events.length ? <Timeline events={events} /> : <EmptyView title="Nothing has happened yet" />}Where it appears
- In the v3 mocks: none directly. The Brand Activity log's clickable timeline is
ActivityLog. - Library only: PR fraud case history (
FraudCaseDetail; no fraud screen in the v3 mocks); kit gallery.
Guidelines
Do
- Keep titles to one sentence in past tense; put the actor in the title.
- Use tones consistently with
StatusPillmeanings.
Don't
- Don't make events clickable by wrapping them; use
ActivityLog. - Don't render more than ~20 events without paging.
RTL and Arabic
- Rail and dots use logical insets and move to the right in RTL.
- Isolated titles keep Latin names and numbers in order inside Arabic sentences.
Tokens
--line, --soft, --ink-2, --ok, --bad, --rasp, --sky-ink, --butter-ink, --c (per event).
Accessibility
- A semantic
<ol>; order is meaningful. Dots are decorative (pseudo-elements), so the title must state the outcome. - Text parts are isolated for mixed scripts.
Found in the source
- No roles, ARIA attributes or key handling are set in this component's own source; it renders native elements and the components it composes.
Read from the component's source and tests. See Accessibility for the patterns the library follows.
Related
ActivityLog: clickable events, loading / empty / error.StepTimeline: fixed steps with done / to do (delivery steps).GiftShipmentTimeline(PR): a shipment's steps.
See also: Card · Accordion · HeroCard · KeyValue
Source
src/kit/patterns/Timeline.tsx (line 19) on GitHub.