Timeline
A timeline component for displaying chronological events with vertical/horizontal layouts, custom markers, and multiple alignment options.
Basic Usage
Order Tracking Timeline
A vertical left-aligned timeline showing order progress.
Order Placed
Your order #12345 has been placed successfully.
Payment Confirmed
Payment of $299.99 has been processed.
Order Shipped
Your package is on its way via Express Delivery.
Out for Delivery
The package is out for delivery in your area.
Delivered
Your package has been delivered. Enjoy!
import { Timeline } from 'fluxo-ui';
import type { TimelineEvent } from 'fluxo-ui';
const events: TimelineEvent[] = [
{ id: '1', title: 'Order Placed', description: 'Order #12345 placed.', timestamp: 'Jan 15', color: 'primary' },
{ id: '2', title: 'Payment Confirmed', description: 'Payment processed.', timestamp: 'Jan 15', color: 'success' },
{ id: '3', title: 'Shipped', description: 'Package on its way.', timestamp: 'Jan 16', color: 'info' },
{ id: '4', title: 'Delivered', description: 'Package delivered.', timestamp: 'Jan 17', color: 'success' },
];
<Timeline events={events} />Horizontal Layout
Use layout="horizontal" for a left-to-right timeline ideal for project milestones.
Horizontal Timeline
A horizontal layout for project milestones or step-based workflows.
Research
Design
Development
Testing
Launch
import { Timeline } from 'fluxo-ui';
<Timeline
events={events}
layout="horizontal"
/>Alternate Alignment
Use align="alternate" to place events on alternating sides of the timeline axis.
Alternate Alignment
Events alternate between left and right sides of the timeline axis.
Founded
Company was founded in a small garage with a big dream.
Series A Funding
Raised $5M in Series A to expand the team.
Product Launch
Launched the flagship product to 10,000 users.
Global Expansion
Opened offices in 3 new countries across Europe and Asia.
IPO
Went public on the NASDAQ stock exchange.
1M Users
Reached one million active users worldwide.
import { Timeline } from 'fluxo-ui';
<Timeline
events={events}
align="alternate"
connectorStyle="dashed"
/>Custom Markers
Pass an icon or marker on each event to customize the timeline markers.
Custom Icons & Markers
Use custom SVG icons in the timeline markers. Combine with markerSize for larger icons.
Task Completed
Initial setup finished.
Achievement Unlocked
First milestone reached!
Deployment
Application deployed to production.
Review Done
Code review passed all checks.
import { Timeline } from 'fluxo-ui';
const checkIcon = <svg>...</svg>;
const events = [
{
id: '1',
title: 'Task Completed',
icon: checkIcon,
color: 'success',
},
// ...
];
<Timeline
events={events}
markerSize="lg"
/>Import
import { Timeline } from 'fluxo-ui';
import type { TimelineEvent, TimelineProps } from 'fluxo-ui';Timeline Props
eventsreqTimelineEvent[]Array of timeline event data.
eventsreqTimelineEvent[]Array of timeline event data.
layout'vertical' | 'horizontal'"'vertical'"Timeline orientation.
layout'vertical' | 'horizontal'"'vertical'"Timeline orientation.
align'left' | 'right' | 'alternate'"'left'"Content alignment relative to the timeline axis.
align'left' | 'right' | 'alternate'"'left'"Content alignment relative to the timeline axis.
connectorStyle'solid' | 'dashed' | 'dotted'"'solid'"Style of the connector lines between events.
connectorStyle'solid' | 'dashed' | 'dotted'"'solid'"Style of the connector lines between events.
markerSize'sm' | 'md' | 'lg'"'md'"Size of timeline markers.
markerSize'sm' | 'md' | 'lg'"'md'"Size of timeline markers.
classNamestringAdditional CSS class for the container.
classNamestringAdditional CSS class for the container.
headingLevel1 | 2 | 3 | 4 | 5 | 6"4"Heading level used for each event title (h1-h6).
headingLevel1 | 2 | 3 | 4 | 5 | 6"4"Heading level used for each event title (h1-h6).
ariaLabelstring"'Timeline'"Accessible name for the timeline container.
ariaLabelstring"'Timeline'"Accessible name for the timeline container.
TimelineEvent Interface
idreqstringUnique identifier for the event.
idreqstringUnique identifier for the event.
titlereqstringEvent title text.
titlereqstringEvent title text.
descriptionReactNodeEvent description or body content.
descriptionReactNodeEvent description or body content.
timestampstringTimestamp or date label.
timestampstringTimestamp or date label.
iconReactNodeCustom icon displayed in the marker.
iconReactNodeCustom icon displayed in the marker.
color'primary' | 'success' | 'warning' | 'danger' | 'info'Color theme for the marker.
color'primary' | 'success' | 'warning' | 'danger' | 'info'Color theme for the marker.
markerReactNodeFully custom marker element (overrides icon and dot).
markerReactNodeFully custom marker element (overrides icon and dot).
contentReactNodeAdditional custom content below description.
contentReactNodeAdditional custom content below description.
hrefstringWhen set, renders the event content as a link to this URL.
hrefstringWhen set, renders the event content as a link to this URL.
onClick() => voidWhen set, renders the event content as a button that fires this callback (mutually exclusive with href).
onClick() => voidWhen set, renders the event content as a button that fires this callback (mutually exclusive with href).
Features
Vertical & Horizontal
Two layout modes for different use cases: vertical scrolling or horizontal milestone display.
Alternate Alignment
Events can alternate between left and right for a visually balanced layout.
Custom Markers
Use icons, custom elements, or the default dot as timeline markers.
Color Variants
Five color options: primary, success, warning, danger, and info.
Connector Styles
Solid, dashed, or dotted connector lines between timeline markers.
Accessibility
Semantic list markup with ARIA roles for screen reader support.