Unified UI

Timeline

A vertical timeline component with icons, connectors, status indicators, and stagger animation. Ideal for activity feeds, changelogs, and process steps.

Basic

A vertical timeline for activity feeds, changelogs, version histories, and multi-step processes. Supports icons, status colors, timestamps, and stagger animations.

2 hours ago

Deployed to production

Version 2.4.0 shipped to all regions.

5 hours ago

Pull request merged

feat: add Slider and PinInput components

1 day ago

Code review completed

All feedback addressed and approved.

2 days ago

Issue reported

Bug in NumberInput keyboard navigation.

Installation

Install the component via the CLI in one command.

npx @work-rjkashyap/unified-ui add timeline
pnpm dlx @work-rjkashyap/unified-ui add timeline
npx @work-rjkashyap/unified-ui add timeline
bunx @work-rjkashyap/unified-ui add timeline

If you haven't initialized your project yet, run npx @work-rjkashyap/unified-ui init first. See the CLI docs for details.

Or install the full package

Use this approach if you prefer to install the entire design system as a dependency instead of copying individual components.

npm install @work-rjkashyap/unified-ui
pnpm add @work-rjkashyap/unified-ui
yarn add @work-rjkashyap/unified-ui
bun add @work-rjkashyap/unified-ui

Anatomy

import {
	Timeline,
	Badge,
	Button,
	TimelineItem,
} from "@work-rjkashyap/unified-ui";

Basic Usage

Pass an items array to Timeline. Each item supports a title, description, timestamp, status, icon, and optional content slot.

<Timeline
  items={[
    {
      title: "Account created",
      description: "Welcome to Unified UI!",
      timestamp: "Jan 1, 2025",
      status: "success",
    },
    {
      title: "First component added",
      description: "Button component published.",
      timestamp: "Jan 3, 2025",
      status: "active",
    },
    {
      title: "Docs published",
      description: "Documentation site launched.",
      timestamp: "Jan 10, 2025",
      status: "default",
    },
  ]}
/>

Status Variants

The status field on each item controls the dot or icon background color and the connector color.

Active step

Currently in progress.

Completed step

Successfully finished.

Warning step

Needs attention.

Error step

Action required.

Pending step

Waiting to start.

Default step

No special state.

StatusDot ColorIcon BackgroundUse Case
default--borderMuted/borderNeutral past events
active--primaryPrimary + ringCurrent step or in-progress
success--successSuccessCompleted, confirmed events
warning--warningWarningNeeds attention, partially done
danger--dangerDangerFailed, blocked, error state
pendingMuted outlineMuted/borderNot yet started

With Icons

Pass any ReactNode as icon to replace the default dot indicator with a styled icon container.

Just now

Deployment complete

All 3 regions updated successfully.

3 min ago

Running tests

CI pipeline in progress — 47 of 112 tests passed.

18 min ago

Build failed

Type error in banner.tsx — line 82.

Sizes

Small

Event one

First event in the timeline.

Event two

Second event in the timeline.

Event three

Third event in the timeline.

Large

Event one

First event in the timeline.

Event two

Second event in the timeline.

Event three

Third event in the timeline.

SizeDotIcon ContainerTitle FontDescription Font
sm8px24px12px12px
md12px32px14px14px
lg16px40px16px14px

Rich Content Slot

Each item accepts a content field for rendering arbitrary content below the description — badges, code snippets, diff previews, etc.

Today

v2.4.0 released

New components and bug fixes.

SliderPinInputNumberInput3 bug fixes

3 days ago

v2.3.1 released

Patch: fix HoverCard animation flicker.

patch

Without Animation

Set animated={false} to disable the stagger slide-in animation entirely.

<Timeline animated={false} items={items} />

Changelog Pattern

A common use case — a versioned changelog feed.

const changelog = [
  {
    title: "v2.4.0 — Major release",
    description: "Added Slider, PinInput, NumberInput, SearchInput, and 12 more components.",
    timestamp: "Dec 2024",
    status: "success" as const,
    icon: <Rocket className="size-4" />,
    content: (
      <div className="flex gap-1 flex-wrap mt-2">
        <Badge variant="success" size="sm">+15 components</Badge>
        <Badge variant="info" size="sm">Motion presets</Badge>
      </div>
    ),
  },
  {
    title: "v2.3.0 — Theme system",
    description: "Introduced DSThemeProvider, CSS custom properties, and dark mode support.",
    timestamp: "Nov 2024",
    status: "success" as const,
  },
  {
    title: "v2.0.0 — Breaking changes",
    description: "Migrated to Tailwind v4, updated token naming convention.",
    timestamp: "Oct 2024",
    status: "warning" as const,
  },
  {
    title: "v1.0.0 — Initial release",
    description: "22 components, token system, Radix UI primitives.",
    timestamp: "Sep 2024",
    status: "default" as const,
  },
];

<Timeline items={changelog} size="md" />

Activity Feed

An activity feed showing user actions with icons and timestamps.

const activity = [
  {
    title: "Sarah left a comment",
    description: `"Looks great! Let's ship it."`,
    timestamp: "2 min ago",
    status: "active" as const,
    icon: <MessageCircle className="size-4" />,
  },
  {
    title: "PR #142 approved",
    description: "feat: add Timeline component",
    timestamp: "15 min ago",
    status: "success" as const,
    icon: <CheckCircle className="size-4" />,
  },
  {
    title: "CI pipeline failed",
    description: "Build error on Node.js 18 target.",
    timestamp: "1 hour ago",
    status: "danger" as const,
    icon: <AlertCircle className="size-4" />,
  },
];

<Timeline items={activity} />

Props

Timeline

PropTypeDefaultDescription
itemsTimelineItemData[]Required. Array of timeline item data objects.
align"left" | "right" | "alternate""left"Layout alignment of items. alternate mirrors odd items.
size"sm" | "md" | "lg""md"Controls dot size, icon container, and typography.
animatedbooleantrueWhether to enable stagger slide-in animation on mount.
classNamestringAdditional CSS classes on the root container.

TimelineItemData

FieldTypeDescription
idstringOptional key. Falls back to array index.
titleReactNodeItem heading.
descriptionReactNodeSecondary text below the title.
timestampReactNodeDate/time string rendered above the title in muted text.
iconReactNodeReplaces the dot indicator with a styled icon container.
status"default" | "active" | "success" | "warning" | "danger" | "pending"Controls dot/icon background color. Defaults to "default".
contentReactNodeOptional rich content rendered below the description.

Motion

  • Stagger — Items animate in sequence using staggerContainerSlow on the wrapper and slideInFromLeft / slideInFromRight per item (direction depends on align and item index).
  • Alternating — With align="alternate", even items slide from left and odd items slide from right.
  • Reduced motion — All animations are bypassed when prefers-reduced-motion is active via useReducedMotion().

Accessibility

  • The root element is a plain <div> — wrap in a <section> or <ol> context if semantics are needed.
  • Each TimelineItem is a <div> with a content column — add role="listitem" and a role="list" wrapper for formal list semantics.
  • Icons and connector lines are aria-hidden="true".
  • Timestamps use <p> elements — they are naturally announced by screen readers in document order (timestamp → title → description).
  • All animation triggers are mount-based and non-interactive — no keyboard events are affected.

Design Tokens

TokenUsage
--primaryActive dot and icon background
--successSuccess dot and icon background
--warningWarning dot and icon background
--dangerDanger dot and icon background
--borderDefault dot color and connector line
--mutedPending dot and icon background
--muted-fgTimestamp text color
--foregroundTitle text color

On this page