nook
Browse the docs

Components

Timeline

Native

Events in the order they happened, joined by a line.

See the prompt
  1. Order placed

  2. Packed at the warehouse

    2 items, 1 parcel.

  3. Out for delivery

    The courier is 4 stops away.

  4. Delivered

    Expected today before 18:00.

Installation

npx nook-ui@latest add timeline

Prompt

Paste this into your AI coding assistant. It adds this exact component, the same way the CLI does, and tells the assistant how to use it.

Short. For assistants that can run commands in your project.

Plain text
Add the Nook "Timeline" component to this project, exactly as Nook ships it.

Events in the order they happened, joined by a line.

Steps
1. Check for `nook.json` in the project root. If it is missing, run `npx nook-ui@latest init` first (React or Next.js with Tailwind CSS v4). It adds the Nook tokens, the theme and `cn()`.
2. Run `npx nook-ui@latest add timeline`. It writes `components/ui/timeline.tsx` together with everything the component needs. Do not write the component from memory.
3. If you cannot run commands, fetch http://localhost:3000/r/timeline.json, write every entry of `files` to the path it names, install the packages in `dependencies`, and repeat for each name in `registryDependencies`.
4. Use it where I ask. Start from this example:

```tsx
import { Timeline, TimelineDescription, TimelineItem, TimelineTime, TimelineTitle } from "@/components/ui/timeline";

export default function TimelineDefault() {
  return (
    <Timeline className="max-w-sm">
      <TimelineItem>
        <TimelineTitle>Order placed</TimelineTitle>
        <TimelineTime dateTime="2026-11-12T09:14">Nov 12, 9:14</TimelineTime>
      </TimelineItem>
      <TimelineItem>
        <TimelineTitle>Packed at the warehouse</TimelineTitle>
        <TimelineDescription>2 items, 1 parcel.</TimelineDescription>
        <TimelineTime dateTime="2026-11-13T15:02">Nov 13, 15:02</TimelineTime>
      </TimelineItem>
      <TimelineItem status="current">
        <TimelineTitle>Out for delivery</TimelineTitle>
        <TimelineDescription>The courier is 4 stops away.</TimelineDescription>
        <TimelineTime dateTime="2026-11-14T08:30">Today, 8:30</TimelineTime>
      </TimelineItem>
      <TimelineItem status="upcoming">
        <TimelineTitle>Delivered</TimelineTitle>
        <TimelineDescription>Expected today before 18:00.</TimelineDescription>
      </TimelineItem>
    </Timeline>
  );
}
```

API
- `Timeline`: The list.
- `TimelineItem`: One event.
  - `status` (`"done" | "current" | "upcoming"`, default "done"): Fills, rings or hollows the marker.
- `TimelineTitle, TimelineDescription, TimelineTime`: What happened, details, and when.

Rules
- Colors, radii, shadows and motion come from Nook tokens and classes such as `bg-primary`, `text-muted-foreground`, `border-border`, `rounded-lg` and `h-control`. Never hard-code them.
- Do not restyle or simplify the file. Change how it looks through `className`, its props and the theme.
- It must keep working with the keyboard, in light and dark mode, and in the sharp, soft and bold styles.
- Accessibility: An ordered list. The current step is marked with `aria-current`; state is also carried by the text, not only by the marker.

Done when the component renders like the example in light and dark mode and the project type-checks.

Usage

import { Timeline, TimelineDescription, TimelineItem, TimelineTime, TimelineTitle } from "@/components/ui/timeline";

export default function TimelineDefault() {
  return (
    <Timeline className="max-w-sm">
      <TimelineItem>
        <TimelineTitle>Order placed</TimelineTitle>
        <TimelineTime dateTime="2026-11-12T09:14">Nov 12, 9:14</TimelineTime>
      </TimelineItem>
      <TimelineItem>
        <TimelineTitle>Packed at the warehouse</TimelineTitle>
        <TimelineDescription>2 items, 1 parcel.</TimelineDescription>
        <TimelineTime dateTime="2026-11-13T15:02">Nov 13, 15:02</TimelineTime>
      </TimelineItem>
      <TimelineItem status="current">
        <TimelineTitle>Out for delivery</TimelineTitle>
        <TimelineDescription>The courier is 4 stops away.</TimelineDescription>
        <TimelineTime dateTime="2026-11-14T08:30">Today, 8:30</TimelineTime>
      </TimelineItem>
      <TimelineItem status="upcoming">
        <TimelineTitle>Delivered</TimelineTitle>
        <TimelineDescription>Expected today before 18:00.</TimelineDescription>
      </TimelineItem>
    </Timeline>
  );
}

Examples

Refund progress

  1. Return received

  2. Items checked

    Both jackets are in good condition.

  3. Refund sent to your bank

    It can take 3 to 5 working days to show up.

Release history

  1. Version 2.4.0

    Saved filters, a faster search and a new export dialog. Fixes the double charge on plan changes.

  2. Version 2.3.2

    Fixes the sign-in loop on Safari.

  3. Version 2.3.0

    Teams can now have their own billing contact. Webhooks retry for 24 hours instead of 1.

  4. Version 2.2.0

    Dark mode for the whole app, and keyboard shortcuts for the inbox.

Hiring steps

  1. Phone screen

    30 minutes with Priya from the design team.

  2. Portfolio walkthrough

    Pick two projects and tell us what you would change.

  3. Meet the team

  4. Offer

Nothing yet

  1. Waiting for your order

    Updates will appear here as soon as the shop confirms it.

Long history

  1. Account created

    Maya signed up with a work email and joined the Studio workspace.

  2. Plan upgraded to Studio

    Billing moved from monthly to yearly, which saves 25%.

  3. Custom domain connected

    docs.northline.example now points at the published site.

  4. Team grew to 12 people

    Three designers and two writers joined in the same week.

  5. Renewal reminder sent

    Your plan renews on March 4. No action is needed.

Props

Timeline

The list.

TimelineItem

One event.

PropTypeDefaultDescription
status"done" | "current" | "upcoming""done"Fills, rings or hollows the marker.

TimelineTitle, TimelineDescription, TimelineTime

What happened, details, and when.

Accessibility

An ordered list. The current step is marked with `aria-current`; state is also carried by the text, not only by the marker.

Checked against WCAG 2.1 AA with automated axe tests and keyboard tests on every release.