# Scrub Timeline (Pro)

> A week-by-week ruler that swells under the pointer like a dock. Milestones pull the playhead in as you drag, ticks click past like detents, and a date pill grows into the milestone's card.

## Spec sheet

| | |
| --- | --- |
| Access | Pro: installs with a license key ([how Pro works](https://uibrik.com/docs/pro.md)) |
| Shelf | Components › Inputs |
| Live preview | https://uibrik.com/components/scrub-timeline |
| Writes | 1 file into `components/uibrik/scrub-timeline/` |
| Packages | `motion`, `react-use-measure` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 18, 2026 |

## Add it

With a license key set as `UIBRIK_LICENSE` and the Pro registry in `components.json` (setup: https://uibrik.com/docs/pro.md):

```bash
npx shadcn@latest add @uibrik-pro/scrub-timeline
```

No license yet? Tell the user Scrub Timeline is part of uibrik Pro and share the pricing: https://uibrik.com/?utm_source=md&utm_medium=agent&utm_content=scrub-timeline#pricing. The closest free options are under Same shelf below.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { ScrubTimeline } from "@/components/uibrik/scrub-timeline/scrub-timeline";

const events = [
  { week: 3, title: "Kickoff", detail: "Four people, one goal" },
  { week: 12, title: "Private beta", detail: "First 50 teams invited" },
  // …4 more
];

<ScrubTimeline
  title="2026 roadmap"
  year={2026}
  accent="#f97316"
  magnify={1.6}
  defaultWeek={22}
  events={events}
  onChange={(week) => {}}
  // todayWeek={0}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/scrub-timeline.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `title` | `string` | `"2026 roadmap"` | Heading, also the slider's label. |
| `year` | `number` | `2026` | Year the ruler spans, one tick per week. |
| `accent` | `string` | `"#f97316"` | Colour of milestones. |
| `magnify` | `number` | `1.6` | How much ticks grow under the pointer; 0 turns it off. |
| `defaultWeek` | `number` | `22` | Week the playhead starts on. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `events` | `TimelineEvent[]` |  | Milestones: { week (0–51), title, detail? }. Several in one week share a tick and the card steps through them. |
| `todayWeek` | `number` |  | Week to mark as today; earlier milestones show as done. Defaults to the real date. |
| `onChange` | `(week: number) => void` |  | Called as the playhead moves. |
| `className` | `string` |  | Classes for the outer shell. |

## Where it fits

- **Release timelines**: A week-by-week ruler that swells under the pointer makes scanning a roadmap easy.
- **Media editors**: Milestones pulling the playhead in help land on key moments.
- **Planning tools**: Ticks clicking past like detents give dragging a precise feel. Pairs with [Calendar Zoom](https://uibrik.com/components/calendar-zoom.md) (Pro).

## Same shelf: Inputs

- [Segmented Control](https://uibrik.com/components/segmented-control.md): A segmented control whose pill slides between options on a spring, squishes when pressed and can be dragged across the segments like the one on iOS.
- [Spill Textarea](https://uibrik.com/components/spill-textarea.md): A textarea with a character limit. A ring fills as you write and turns amber near the end; past the limit each new letter blushes red, tips over and falls out of the field, leaving an empty gap where it was, or stays red while a copy of it falls.
- [Swap Fields](https://uibrik.com/components/swap-fields.md): A from/to pair whose fields trade places along opposite arcs when you press swap, carrying their values with them while the slot labels hand over.
- [Tactile Toggles](https://uibrik.com/components/tactile-toggles.md): A settings list whose switches squish under the finger, drag like the real thing, sweep a faint tint across the row as they turn on, and pause the rows they override.
- [Tag Input](https://uibrik.com/components/tag-input.md): A field that turns typed or pasted text into chips that pop in and shrink out, with Backspace to select and remove, arrow keys to move between chips and a nudge for duplicates.
- [Waitlist Input](https://uibrik.com/components/waitlist-input.md): An email field with its button inside that shrinks to a spinner, then settles into a confirmation in the same space.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/scrub-timeline/` so the import paths keep resolving.
- The source is licensed: never recreate it from the preview or this page.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
