npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-tw-timeline

v0.1.2

Published

A vertical center-line timeline component for React + Tailwind CSS with scroll-triggered animations and dark mode support

Readme

react-tw-timeline

A vertical center-line timeline component for React + Tailwind CSS with scroll-triggered animations and dark mode support.

Live Storybook Demo

Installation

pnpm add react-tw-timeline
# or
npm install react-tw-timeline

Optional: Scroll Animations

Install framer-motion for scroll-triggered animations. Without it, the component renders without animations.

pnpm add framer-motion

Tailwind CSS Setup

The package ships its src/ directory so Tailwind can scan the component classes.

Tailwind v4 — add to your CSS file:

@source "../node_modules/react-tw-timeline/src";

Tailwind v3 — add to tailwind.config.js:

module.exports = {
  content: [
    // ...your paths
    "./node_modules/react-tw-timeline/src/**/*.{ts,tsx}",
  ],
};

Usage

import { Timeline } from "react-tw-timeline";

const items = [
  {
    id: "1",
    title: "Senior Engineer",
    subtitle: "Acme Corp",
    description: "Led the platform team.",
    date: "2023 - Present",
    tags: ["React", "TypeScript"],
  },
  {
    id: "2",
    title: "Engineer",
    subtitle: "Startup Inc",
    description: "Built the dashboard.",
    date: "2021 - 2023",
  },
];

function App() {
  return <Timeline items={items} />;
}

Props

| Prop | Type | Default | Description | | ------------- | ---------------------------- | -------------------------------------- | --------------------------------- | | items | TimelineItem[] | required | Array of timeline entries | | renderItem | (item, index) => ReactNode | — | Custom card renderer | | lineColor | string | "bg-slate-800 dark:bg-slate-300" | Tailwind classes for line & dot | | accentColor | string | "text-slate-800 dark:text-slate-300" | Tailwind classes for date & arrow | | animated | boolean | true | Enable framer-motion animations | | className | string | — | Additional container classes |

TimelineItem

type TimelineItem = {
  id: string;
  title: string;
  subtitle?: string;
  description: string;
  date: string;
  tags?: string[];
};

Custom Rendering

Use the renderItem prop for full control over card content:

<Timeline
  items={items}
  renderItem={(item, index) => (
    <div className="rounded-lg border p-4">
      <h3>{item.title}</h3>
      <p>{item.description}</p>
    </div>
  )}
/>

Theming

Pass Tailwind color classes to customize the timeline:

<Timeline
  items={items}
  lineColor="bg-teal-600 dark:bg-teal-400"
  accentColor="text-teal-600 dark:text-teal-400"
/>

Dark Mode

The component supports dark mode out of the box using Tailwind's dark: variant. Wrap your app (or a parent element) with the dark class:

<div class="dark">
  <!-- Timeline will render in dark mode -->
</div>

All default colors adapt automatically — cards, text, chips, line, and arrow all switch to dark-friendly tones.

Exports

  • Timeline — main component
  • TimelineCard — default card component
  • TimelineChip — tag chip sub-component
  • TimelineItem (type) — item data shape
  • TimelineProps (type) — component props

License

MIT