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
classNamestringAdditional CSS classes for the container
itemClassNamestringAdditional CSS classes for each timeline item wrapper
lineClassNamestringAdditional CSS classes for the vertical line

Compound Components

Timeline.Item

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

PropTypeDefaultDescription
dataTimelineItemDataItem data for default card rendering
indexnumber0Item index for animation stagger and alternating layout in center mode
colorThemeColorOverride color for this item's dot
classNamestringAdditional CSS classes
childrenReactNodeCustom content (Timeline.Card, Timeline.Header, etc.)

Timeline.Card

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

PropTypeDefaultDescription
dataTimelineItemDataItem data for default content rendering
typeCardTypeCard type override (inherits from Timeline root)
hoverEffectHoverEffectHover effect override (inherits from Timeline root)
showIconbooleanOverride whether to show icon in card header
classNamestringAdditional CSS classes
childrenReactNodeCustom card content (overrides data rendering)

Timeline.Header

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

PropTypeDefaultDescription
titlestringThe main title text
descriptionstringThe description text
iconReactNode | LucideIconIcon to display
datestringDate/time display
durationstringDuration display
classNamestringAdditional CSS classes

Timeline.Dot

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

PropTypeDefaultDescription
colorThemeColorOverride the dot color
iconReactNode | LucideIconIcon to display when iconPosition='dot'
classNamestringAdditional 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
classNamestringAdditional CSS classes