Skip to main content

Timeline

A compound component timeline with center/left/right alignment, motion animations, and server-compatible skeleton. Features iconPosition prop to show icons on timeline dots or in cards. Uses Timeline.Item, Timeline.Card, Timeline.Header, and Timeline.Dot sub-components.

Installation

$ npx shadcn@latest add @orecus/timeline
Dependencies:
motionlucide-react
Registry:
@orecus/color-utils@orecus/card@orecus/header

Component

Timeline component for displaying chronological events with cards, icons, and customizable layouts.

Center Alignment (Compound API)

Jan 2022 — Present(3 years)
Senior Developer
Tech Company, Stockholm, Sweden

Leading frontend development for enterprise applications.

  • •Architected a new component library
  • •Mentored junior developers
ReactTypeScriptNext.js
Mar 2019 — Dec 2021(2 years 9 months)
Full Stack Developer
Startup Inc, Remote

Built and maintained web applications from scratch.

  • •Launched 3 products
  • •Reduced load time by 40%
Node.jsReactPostgreSQL
2015 — 2019(4 years)
Computer Science Degree
University of Technology, Sweden

Bachelor's degree with focus on software engineering.

Left Alignment

Jan 2022 — Present(3 years)
Senior Developer
Tech Company, Stockholm, Sweden

Leading frontend development for enterprise applications.

  • •Architected a new component library
  • •Mentored junior developers
ReactTypeScriptNext.js
Mar 2019 — Dec 2021(2 years 9 months)
Full Stack Developer
Startup Inc, Remote

Built and maintained web applications from scratch.

  • •Launched 3 products
  • •Reduced load time by 40%
Node.jsReactPostgreSQL

Props

PropTypeDefaultDescription
alignment'center' | 'left' | 'right''center'Timeline line position
colorThemeColor'primary'Theme color for line, dots, and connectors
iconPosition'dot' | 'card''card'Where icons are displayed - on timeline dot or in card header
cardTypeCardType'normal'Default card style for Timeline.Card
cardHoverEffectHoverEffect'lift'Default hover effect for Timeline.Card
animation'slide' | 'fade' | 'none''slide'Animation style for items appearing
classNamestring—Additional CSS classes for the container
itemClassNamestring—Additional CSS classes for each timeline item wrapper
lineClassNamestring—Additional CSS classes for the vertical line

Compound Components

Timeline.Item

A timeline entry that positions content relative to the timeline line.

PropTypeDefaultDescription
dataTimelineItemData—Item data for default card rendering
indexnumber0Item index for animation stagger and alternating layout in center mode
colorThemeColor—Override color for this item's dot
classNamestring—Additional CSS classes
childrenReactNode—Custom content (Timeline.Card, Timeline.Header, etc.)

Timeline.Card

The card component that wraps timeline item content. Integrates with the Card component.

PropTypeDefaultDescription
dataTimelineItemData—Item data for default content rendering
typeCardType—Card type override (inherits from Timeline root)
hoverEffectHoverEffect—Hover effect override (inherits from Timeline root)
showIconboolean—Override whether to show icon in card header
classNamestring—Additional CSS classes
childrenReactNode—Custom card content (overrides data rendering)

Timeline.Header

Header component for use inside Timeline.Card. Wraps the Header component with timeline-specific additions.

PropTypeDefaultDescription
titlestring—The main title text
descriptionstring—The description text
iconReactNode | LucideIcon—Icon to display
datestring—Date/time display
durationstring—Duration display
classNamestring—Additional CSS classes

Timeline.Dot

The dot/marker on the timeline. Automatically rendered by Timeline.Item but can be customized.

PropTypeDefaultDescription
colorThemeColor—Override the dot color
iconReactNode | LucideIcon—Icon to display when iconPosition='dot'
classNamestring—Additional CSS classes

Timeline.Skeleton

Server-compatible loading skeleton for the timeline.

PropTypeDefaultDescription
itemsnumber3Number of skeleton items to display
alignment'center' | 'left' | 'right''center'Timeline alignment to match
showIconbooleantrueShow icon skeleton in card header
showTagsbooleantrueShow tags skeleton
showHighlightsbooleantrueShow highlights skeleton
classNamestring—Additional CSS classes