# Changelog timeline

> What shipped, drawn as you read: a rail that fills, dots that light, filters that fold the rest away.

A changelog is proof that a product is alive, and most read like a log file. Here a hairline rail runs down the page and fills as you scroll, and each release’s dot fills as the line reaches it, so reading feels like moving through time. Entries rise out of a light blur the first time they come into view. All, New, Improved and Fixed sit in a switch whose pill is thrown to the choice; releases that don’t match fold away and the count rolls. Older releases wait behind "Show 6 older", which folds them open and morphs to "Show fewer". Every release has an anchor, so you can link to it.

## Install

```bash
npx shadcn@latest add https://hairlineui.com/r/changelog-timeline.json
```

Needs React 19, Tailwind CSS v4 and shadcn/ui theme variables (any style, light and dark). Icons from lucide-react.

- npm: none
- Hairline UI components it needs (the CLI installs them too): `number-roll`, `text-morph`
- Docs and live preview: https://hairlineui.com/ui/changelog-timeline
- Registry item (source): https://hairlineui.com/r/changelog-timeline.json

## Usage

```tsx
import { ChangelogTimeline } from "@/components/changelog-timeline";

<ChangelogTimeline
  entries={[
    { id: "shift-planner", date: "2026-10-06", version: "v2.8", title: "Shift planner", tags: ["new"], body: <p>Drag shifts onto the week…</p> },
    { id: "receipt-fix", date: "2026-09-15", version: "v2.6.4", title: "Receipts print the right shop name", tags: ["fixed"] },
  ]}
/>
```

## From Markdown files

Keep one file per release and render them into the timeline on a /changelog page.

```tsx
import { ChangelogTimeline } from "@/components/changelog-timeline";
import { getReleases } from "@/lib/releases"; // reads content/changelog/*.mdx

export default async function ChangelogPage() {
  const releases = await getReleases();
  return (
    <main className="mx-auto max-w-3xl px-6 py-24">
      <h1 className="mb-12 text-5xl font-medium tracking-[-0.04em]">Changelog</h1>
      <ChangelogTimeline
        initialCount={8}
        entries={releases.map((r) => ({ id: r.slug, date: r.date, version: r.version, title: r.title, tags: r.tags, body: <r.Content /> }))}
      />
    </main>
  );
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `entries` | `ChangelogEntry[]` | – | Newest first: id (its anchor), date, title, and any of version, tags, body, media. |
| `initialCount` | `number` | `4` | How many show before "Show older". |
| `filters` | `{ tag; label }[]` | – | The switch’s options; by default the tags found in the entries (new, improved and fixed get their own labels and tints). |
| `locales` | `string \| string[]` | `"en-GB"` | How dates read. |

## States

- **read**: The line fills the rail to 55% of the way down the screen as you scroll; a dot’s centre fills (420ms, slight overshoot) and its ring darkens as the line passes it. It only listens while the timeline is on screen.
- **arrive**: Each release rises 14px out of a 4px blur (700ms) the first time it scrolls into view.
- **filter**: The pill is thrown to the chosen tag (460ms); releases without it fold to nothing (480ms) and the count rolls.
- **older**: Beyond initialCount, releases fold open on "Show 6 older", whose label morphs to "Show fewer".

## What it handles

Most changelogs read like a log file. This one turns release notes into a page people read to the end, and lets them filter by the kind of change.

- **A rail that fills as you read**: The line fills as you scroll and each release’s dot lights when the line reaches it.
- **Filter by kind**: All, New, Improved and Fixed. Releases that don’t match fold away and the count rolls.
- **Older releases wait**: After the first few, “Show 6 older” folds the rest open, and the label becomes “Show fewer”.
- **Every release has a link**: Each has an anchor, and its title links to it, so you can point people at one update.
- **Entries arrive as you read**: Each release rises out of a light blur the first time it comes into view.
- **Real markup**: An ordered list of articles with <time> elements. Folded releases are hidden from assistive tech.

## Replaces

a changelog layout, scroll progress code, tag filters, a show-more list, anchor links

## Where it fits

- **A public /changelog page**: Release notes that read like a story instead of a log file.
- **In-app “What’s new”**: A page inside the product where people catch up on updates.
- **SDK and library release notes**: Filter New, Improved and Fixed so people find what they need.
- **Landing page proof**: Show that the product is alive, with a steady rhythm of releases.

## Notes

- An ordered list of articles with real <time> elements; each title links to its own anchor.
- The filter is a radio group (arrow keys move); the count of updates is announced politely when it changes.
- Folded releases are inert and hidden from assistive tech.
- The scroll listener is passive, throttled to one update a frame and only active while the timeline is on screen.
- Installs Number roll and Text morph. With reduced motion, releases are simply there and nothing slides.

License: MIT (https://hairlineui.com/license#components)
