# Milestone Timeline

A company history down a spine that fills as you scroll: each milestone's dot fills with a ripple as the line reaches it, and its text brightens as it's reached.

- Page and source: https://uibrik.com/components/milestone-timeline
- Install (Pro, needs a license key, see https://uibrik.com/docs/pro): `npx shadcn@latest add @uibrik-pro/milestone-timeline`
- Packages: none beyond React
- Import: `import { MilestoneTimeline } from "@/components/uibrik/milestone-timeline/milestone-timeline"`

Where to use the Milestone Timeline React component:

- **About and company history pages**: The line fills under the reader's scroll, so years of history read as one continuous story. Pairs with [Testimonial Wall](https://uibrik.com/components/testimonial-wall).
- **Product release history**: Versions light up in order with their launch tags as the reader scrolls past them.
- **Onboarding and case-study stories**: Alternate layout zig-zags the steps across the spine for a lighter, editorial page. Pairs with [Scroll to Highlight](https://uibrik.com/components/scroll-highlight).

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| layout | `"left" \| "alternate"` | `"left"` | Keep milestones on one side of the spine, or zig-zag them on wide containers. |
| color | `string` | `""` | Fill and reached-dot colour. Empty uses the text colour. |
| anchor | `number` | `0.55` | Where the fill's tip sits, as a fraction of the viewport height from the top. |
| items | `{ id?: string; date: string; title: string; description?: string; tag?: string; icon?: ReactNode }[]` | `SAMPLE_MILESTONES` | Milestones, oldest first. `date` is shown as given, so "Q3 2024" works. |
| scrollContainer | `RefObject<HTMLElement \| null>` |  | Scrolling element to follow when the timeline isn't scrolled by the window. |
| className | `string` |  | Classes for the section. |
