# Timeline (/ui/components/react/timeline)


## Usage [#usage]

```tsx
import {
  Timeline,
  TimelineItem,
  TimelineIndicator,
  TimelineContent,
  TimelineTitle,
  TimelineDescription,
  TimelineTime,
} from '@appica/ui-react/timeline'
```

```tsx
<Timeline aria-label="Order activity">
  <TimelineItem>
    <TimelineIndicator />
    <TimelineContent>
      <TimelineTitle>Payment captured</TimelineTitle>
      <TimelineTime dateTime="2026-12-04T10:41">10:41 AM</TimelineTime>
    </TimelineContent>
  </TimelineItem>
</Timeline>
```

1 component covers an activity feed, a progress tracker and a list of steps. The parts:

- **`Timeline`** - the ordered list. `orientation` lays the items top to bottom or side by side, `size` scales them, and `numbered` numbers the steps.
- **`TimelineItem`** - 1 event or step. Its `status` (`complete`, `current`, `pending` or `error`) drives the indicator and the line after it. Leave it out for the events of an activity feed.
- **`TimelineIndicator`** - the marker on the line, and the line to the next item. Left empty, it draws a dot, a number, a check or a cross to match the status. Put an icon, an [`Avatar`](/ui/components/react/avatar) or a [`Spinner`](/ui/components/react/spinner) in it to replace them.
- **`TimelineContent`** - everything beside the marker: the text, and anything else the item needs, such as a button.
- **`TimelineTitle`**, **`TimelineDescription`** and **`TimelineTime`** - the title, a muted detail, and a `<time>` element.

The items are spaced evenly, whatever their dates. For a schedule or a Gantt chart, where position follows time, build a time grid instead.

## Examples [#examples]

### Activity feed [#activity-feed]

Icons and avatars go inside the indicator, and `variant` tints it by the kind of event. A flex row puts the time on the end side of the title.

```tsx
import {
  Timeline,
  TimelineItem,
  TimelineIndicator,
  TimelineContent,
  TimelineTitle,
  TimelineDescription,
  TimelineTime,
} from '@appica/ui-react/timeline'
import { Avatar, AvatarFallback } from '@appica/ui-react/avatar'
import { CreditCard, MailCheck, TruckDelivery } from '@appica/icons-react'

export default function TimelineDefault() {
  return (
    <Timeline aria-label="Order activity" className="w-full max-w-md">
      <TimelineItem>
        <TimelineIndicator variant="success">
          <TruckDelivery />
        </TimelineIndicator>
        <TimelineContent>
          <div className="flex w-full items-baseline justify-between gap-3">
            <TimelineTitle>Order delivered</TimelineTitle>
            <TimelineTime dateTime="2026-12-04T14:20">2:20 PM</TimelineTime>
          </div>
          <TimelineDescription>Left at the front door, signed by J. Appleseed.</TimelineDescription>
        </TimelineContent>
      </TimelineItem>
      <TimelineItem>
        <TimelineIndicator variant="info">
          <MailCheck />
        </TimelineIndicator>
        <TimelineContent>
          <div className="flex w-full items-baseline justify-between gap-3">
            <TimelineTitle>Shipping confirmation sent</TimelineTitle>
            <TimelineTime dateTime="2026-12-03T09:05">Yesterday</TimelineTime>
          </div>
          <TimelineDescription>To jane@example.com, with the tracking link.</TimelineDescription>
        </TimelineContent>
      </TimelineItem>
      <TimelineItem>
        <TimelineIndicator>
          <CreditCard />
        </TimelineIndicator>
        <TimelineContent>
          <div className="flex w-full items-baseline justify-between gap-3">
            <TimelineTitle>Payment of $128.00 captured</TimelineTitle>
            <TimelineTime dateTime="2026-12-02T18:41">Dec 2</TimelineTime>
          </div>
          <TimelineDescription>Visa ending in 4242.</TimelineDescription>
        </TimelineContent>
      </TimelineItem>
      <TimelineItem>
        <TimelineIndicator>
          <Avatar size="xs">
            <AvatarFallback>JA</AvatarFallback>
          </Avatar>
        </TimelineIndicator>
        <TimelineContent>
          <div className="flex w-full items-baseline justify-between gap-3">
            <TimelineTitle>Jane Appleseed placed the order</TimelineTitle>
            <TimelineTime dateTime="2026-12-02T18:40">Dec 2</TimelineTime>
          </div>
        </TimelineContent>
      </TimelineItem>
    </Timeline>
  )
}
```

### Progress [#progress]

A `status` on each item turns the list into a tracker. A complete step fills the line to the next one, the current step gets a ring and `aria-current="step"`, and pending steps stay muted.

```tsx
import {
  Timeline,
  TimelineItem,
  TimelineIndicator,
  TimelineContent,
  TimelineTitle,
  TimelineDescription,
  TimelineTime,
} from '@appica/ui-react/timeline'

export default function TimelineProgress() {
  return (
    <Timeline aria-label="Delivery progress" className="w-full max-w-sm">
      <TimelineItem status="complete">
        <TimelineIndicator />
        <TimelineContent>
          <TimelineTitle>Order confirmed</TimelineTitle>
          <TimelineTime dateTime="2026-12-04T14:10">2:10 PM</TimelineTime>
        </TimelineContent>
      </TimelineItem>
      <TimelineItem status="complete">
        <TimelineIndicator />
        <TimelineContent>
          <TimelineTitle>Courier assigned</TimelineTitle>
          <TimelineTime dateTime="2026-12-04T14:11">2:11 PM</TimelineTime>
        </TimelineContent>
      </TimelineItem>
      <TimelineItem status="current">
        <TimelineIndicator />
        <TimelineContent>
          <TimelineTitle>On the way</TimelineTitle>
          <TimelineDescription>Arriving in about 12 minutes.</TimelineDescription>
        </TimelineContent>
      </TimelineItem>
      <TimelineItem status="pending">
        <TimelineIndicator />
        <TimelineContent>
          <TimelineTitle>Delivered</TimelineTitle>
        </TimelineContent>
      </TimelineItem>
    </Timeline>
  )
}
```

### Numbered steps [#numbered-steps]

`numbered` puts the step number in each empty indicator, and a complete step swaps its number for a check. The content can hold the action for the current step.

```tsx
import {
  Timeline,
  TimelineItem,
  TimelineIndicator,
  TimelineContent,
  TimelineTitle,
  TimelineDescription,
} from '@appica/ui-react/timeline'
import { Button } from '@appica/ui-react/button'

export default function TimelineNumbered() {
  return (
    <Timeline numbered aria-label="Set up your store" className="w-full max-w-md">
      <TimelineItem status="complete">
        <TimelineIndicator />
        <TimelineContent>
          <TimelineTitle>Add your first product</TimelineTitle>
          <TimelineDescription>Done. You can add more from the catalog at any time.</TimelineDescription>
        </TimelineContent>
      </TimelineItem>
      <TimelineItem status="current">
        <TimelineIndicator />
        <TimelineContent>
          <TimelineTitle>Set up payments</TimelineTitle>
          <TimelineDescription>Connect a payment provider so customers can check out.</TimelineDescription>
          <Button size="sm" className="mt-2">
            Connect provider
          </Button>
        </TimelineContent>
      </TimelineItem>
      <TimelineItem status="pending">
        <TimelineIndicator />
        <TimelineContent>
          <TimelineTitle>Choose your domain</TimelineTitle>
        </TimelineContent>
      </TimelineItem>
    </Timeline>
  )
}
```

### Horizontal [#horizontal]

`orientation="horizontal"` lays the items side by side. When they don't fit, the row scrolls with its scrollbar hidden, fades the edge that has more to show, and keeps the current step in view. Narrow your window to see it.

```tsx
import {
  Timeline,
  TimelineItem,
  TimelineIndicator,
  TimelineContent,
  TimelineTitle,
  TimelineTime,
} from '@appica/ui-react/timeline'

const STAGES = [
  { title: 'Ordered', time: 'Dec 2' },
  { title: 'Packed', time: 'Dec 3' },
  { title: 'Shipped', time: 'Dec 3' },
  { title: 'Out for delivery', time: 'Today' },
  { title: 'Delivered', time: 'Expected today' },
]

export default function TimelineHorizontal() {
  return (
    <Timeline orientation="horizontal" aria-label="Shipment progress" className="max-w-2xl">
      {STAGES.map((stage, index) => (
        <TimelineItem key={stage.title} status={index < 3 ? 'complete' : index === 3 ? 'current' : 'pending'}>
          <TimelineIndicator />
          <TimelineContent>
            <TimelineTitle>{stage.title}</TimelineTitle>
            <TimelineTime>{stage.time}</TimelineTime>
          </TimelineContent>
        </TimelineItem>
      ))}
    </Timeline>
  )
}
```

### Stepper [#stepper]

Move the statuses along as the user goes through a flow: the line fills toward the next step and its check draws in. The timeline only shows the steps, so the flow's state and its buttons stay in your code.

```tsx
'use client'

import { useState } from 'react'
import { Timeline, TimelineItem, TimelineIndicator, TimelineContent, TimelineTitle } from '@appica/ui-react/timeline'
import { Button } from '@appica/ui-react/button'

const STEPS = ['Account', 'Workspace', 'Billing', 'Invite team']

export default function TimelineStepper() {
  const [step, setStep] = useState(1)

  return (
    <div className="flex w-full max-w-2xl flex-col gap-6">
      <Timeline orientation="horizontal" numbered aria-label="Onboarding">
        {STEPS.map((title, index) => (
          <TimelineItem key={title} status={index < step ? 'complete' : index === step ? 'current' : 'pending'}>
            <TimelineIndicator />
            <TimelineContent>
              <TimelineTitle>{title}</TimelineTitle>
            </TimelineContent>
          </TimelineItem>
        ))}
      </Timeline>
      <div className="flex gap-2">
        <Button variant="outline" size="sm" disabled={step === 0} onClick={() => setStep(step - 1)}>
          Back
        </Button>
        <Button size="sm" disabled={step === STEPS.length} onClick={() => setStep(step + 1)}>
          {step >= STEPS.length - 1 ? 'Finish' : 'Next'}
        </Button>
      </div>
    </div>
  )
}
```

### Clickable steps [#clickable-steps]

Render a title as a `<button>` with `render`, and give it `before:absolute before:inset-0` so the whole item takes the click. Steps the user hasn't reached stay disabled, and each finished step shows the choice made there in its description. Wrap the list in a `<nav>` when the steps move the user around a flow.

```tsx
'use client'

import { useState } from 'react'
import {
  Timeline,
  TimelineItem,
  TimelineIndicator,
  TimelineContent,
  TimelineTitle,
  TimelineDescription,
} from '@appica/ui-react/timeline'
import { Button } from '@appica/ui-react/button'
import { Card } from '@appica/ui-react/card'
import { NumberField } from '@appica/ui-react/number-field'
import { Radio } from '@appica/ui-react/radio'
import { RadioGroup } from '@appica/ui-react/radio-group'

type Kind = 'percentage' | 'fixed' | 'shipping'
type Audience = 'everyone' | 'vip' | 'first'

const KINDS: { value: Kind; label: string }[] = [
  { value: 'percentage', label: 'Percentage off' },
  { value: 'fixed', label: 'Fixed amount off' },
  { value: 'shipping', label: 'Free shipping' },
]

const AUDIENCES: { value: Audience; label: string }[] = [
  { value: 'everyone', label: 'All customers' },
  { value: 'vip', label: 'VIP segment (214)' },
  { value: 'first', label: 'First-time buyers' },
]

const STEPS = [
  { title: 'Discount type', hint: 'What the code takes off the order.' },
  { title: 'Value', hint: 'How much the customer saves.' },
  { title: 'Customers', hint: 'Who can use the code at checkout.' },
  { title: 'Review', hint: 'Check the details before the code goes live.' },
]

const currency = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumFractionDigits: 0 })

export default function TimelineWizard() {
  const [step, setStep] = useState(0)
  const [reached, setReached] = useState(0)
  const [created, setCreated] = useState(false)
  const [kind, setKind] = useState<Kind>('percentage')
  const [amount, setAmount] = useState<number | null>(20)
  const [audience, setAudience] = useState<Audience>('everyone')

  const value =
    kind === 'percentage'
      ? `${amount ?? 0}% off`
      : kind === 'fixed'
        ? `${currency.format(amount ?? 0)} off`
        : `On orders over ${currency.format(amount ?? 0)}`
  const summaries = [
    KINDS.find((option) => option.value === kind)?.label,
    value,
    AUDIENCES.find((option) => option.value === audience)?.label,
  ]

  function goTo(next: number) {
    setStep(next)
    setReached((current) => Math.max(current, next))
  }

  function restart() {
    setCreated(false)
    setStep(0)
    setReached(0)
  }

  return (
    <Card frame className="w-full max-w-2xl">
      <div className="@container">
        <div className="flex flex-col gap-8 p-4 @xl:flex-row">
          <nav aria-label="Discount setup" className="@xl:w-52 @xl:shrink-0">
            <Timeline numbered>
              {STEPS.map((item, index) => {
                const reachable = !created && index <= reached
                const status =
                  created || (index < reached && index !== step) ? 'complete' : index === step ? 'current' : 'pending'
                return (
                  <TimelineItem key={item.title} status={status}>
                    <TimelineIndicator />
                    <TimelineContent>
                      <TimelineTitle
                        render={<button type="button" disabled={!reachable} onClick={() => setStep(index)} />}
                        className="outline-ring rounded-xs text-start before:absolute before:inset-0 focus-visible:outline-2 focus-visible:outline-offset-2 enabled:cursor-pointer enabled:hover:underline enabled:hover:underline-offset-4"
                      >
                        {item.title}
                      </TimelineTitle>
                      {summaries[index] && (index < reached || created) ? (
                        <TimelineDescription>{summaries[index]}</TimelineDescription>
                      ) : null}
                    </TimelineContent>
                  </TimelineItem>
                )
              })}
            </Timeline>
          </nav>

          <div className="flex min-w-0 flex-1 flex-col gap-5 @xl:min-h-72">
            {created ? (
              <>
                <div>
                  <h3 className="text-foreground-intense font-semibold">WINTER20 is live</h3>
                  <p className="text-foreground-muted text-sm">
                    {value} for {summaries[2]?.toLowerCase()}. Share the code, or add it to a campaign.
                  </p>
                </div>
                <div className="mt-auto grid grid-cols-2 gap-2">
                  <Button variant="outline" size="sm" className="col-start-2" onClick={restart}>
                    Create another
                  </Button>
                </div>
              </>
            ) : (
              <>
                <div>
                  <h3 className="text-foreground-intense font-semibold">{STEPS[step]?.title}</h3>
                  <p className="text-foreground-muted text-sm">{STEPS[step]?.hint}</p>
                </div>

                {step === 0 ? (
                  <RadioGroup value={kind} onValueChange={(next) => setKind(next as Kind)} aria-label="Discount type">
                    {KINDS.map((option) => (
                      <label key={option.value} className="flex items-center gap-2 text-sm select-none">
                        <Radio value={option.value} />
                        {option.label}
                      </label>
                    ))}
                  </RadioGroup>
                ) : null}

                {step === 1 ? (
                  <div className="flex flex-col gap-1.5">
                    <label htmlFor="wizard-value" className="text-foreground-intense text-sm font-medium">
                      {kind === 'percentage' ? 'Percentage' : kind === 'fixed' ? 'Amount' : 'Minimum order'}
                    </label>
                    <NumberField
                      id="wizard-value"
                      variant="soft"
                      className="w-32"
                      value={amount}
                      onValueChange={setAmount}
                      min={0}
                      max={kind === 'percentage' ? 100 : undefined}
                      step={kind === 'percentage' ? 5 : 10}
                      format={
                        kind === 'percentage'
                          ? { style: 'unit', unit: 'percent' }
                          : { style: 'currency', currency: 'USD', maximumFractionDigits: 0 }
                      }
                      locale="en-US"
                    />
                  </div>
                ) : null}

                {step === 2 ? (
                  <RadioGroup
                    value={audience}
                    onValueChange={(next) => setAudience(next as Audience)}
                    aria-label="Customers"
                  >
                    {AUDIENCES.map((option) => (
                      <label key={option.value} className="flex items-center gap-2 text-sm select-none">
                        <Radio value={option.value} />
                        {option.label}
                      </label>
                    ))}
                  </RadioGroup>
                ) : null}

                {step === 3 ? (
                  <dl className="bg-background-soft divide-background divide-y-2 overflow-hidden rounded-md text-sm *:flex *:justify-between *:gap-4 *:px-3 *:py-2.5">
                    <div>
                      <dt className="text-foreground-muted">Code</dt>
                      <dd className="text-foreground-intense font-medium">WINTER20</dd>
                    </div>
                    {STEPS.slice(0, 3).map((item, index) => (
                      <div key={item.title}>
                        <dt className="text-foreground-muted">{item.title}</dt>
                        <dd className="text-foreground-intense text-end font-medium">{summaries[index]}</dd>
                      </div>
                    ))}
                  </dl>
                ) : null}

                <div className="mt-auto grid grid-cols-2 gap-2">
                  <Button variant="outline" size="sm" disabled={step === 0} onClick={() => setStep(step - 1)}>
                    Back
                  </Button>
                  {step < STEPS.length - 1 ? (
                    <Button size="sm" onClick={() => goTo(step + 1)}>
                      Continue
                    </Button>
                  ) : (
                    <Button size="sm" onClick={() => setCreated(true)}>
                      Create discount
                    </Button>
                  )}
                </div>
              </>
            )}
          </div>
        </div>
      </div>
    </Card>
  )
}
```

### Errors and running steps [#errors-and-running-steps]

`status="error"` draws a cross. For a step that's still running, put a `Spinner` in its indicator and size it with a `text-*` class.

```tsx
import {
  Timeline,
  TimelineItem,
  TimelineIndicator,
  TimelineContent,
  TimelineTitle,
  TimelineDescription,
  TimelineTime,
} from '@appica/ui-react/timeline'
import { Spinner } from '@appica/ui-react/spinner'

export default function TimelineRun() {
  return (
    <Timeline aria-label="Run #1042" className="w-full max-w-sm">
      <TimelineItem status="complete">
        <TimelineIndicator />
        <TimelineContent>
          <TimelineTitle>Fetch new orders</TimelineTitle>
          <TimelineTime>1.2s</TimelineTime>
        </TimelineContent>
      </TimelineItem>
      <TimelineItem status="error">
        <TimelineIndicator />
        <TimelineContent>
          <TimelineTitle>Sync inventory</TimelineTitle>
          <TimelineDescription>The warehouse API timed out after 30s.</TimelineDescription>
        </TimelineContent>
      </TimelineItem>
      <TimelineItem status="current">
        <TimelineIndicator>
          <Spinner variant="dots" currentColor className="text-sm" />
        </TimelineIndicator>
        <TimelineContent>
          <TimelineTitle>Retrying sync</TimelineTitle>
          <TimelineDescription>Attempt 2 of 3.</TimelineDescription>
        </TimelineContent>
      </TimelineItem>
      <TimelineItem status="pending">
        <TimelineIndicator />
        <TimelineContent>
          <TimelineTitle>Email the summary</TimelineTitle>
        </TimelineContent>
      </TimelineItem>
    </Timeline>
  )
}
```

### Grouped by day [#grouped-by-day]

Give each day a heading and its own `Timeline`, and name the list with the heading through `aria-labelledby`.

```tsx
import {
  Timeline,
  TimelineItem,
  TimelineIndicator,
  TimelineContent,
  TimelineTitle,
  TimelineTime,
} from '@appica/ui-react/timeline'

const DAYS = [
  {
    label: 'Today',
    events: [
      { title: 'Refund of $24.00 issued', time: '11:20 AM' },
      { title: 'Return received at the warehouse', time: '9:02 AM' },
    ],
  },
  {
    label: 'Yesterday',
    events: [
      { title: 'Return label created', time: '4:45 PM' },
      { title: 'Return requested by the customer', time: '4:41 PM' },
    ],
  },
]

export default function TimelineGrouped() {
  return (
    <div className="flex w-full max-w-md flex-col gap-4">
      {DAYS.map((day) => (
        <div key={day.label} className="flex flex-col gap-3">
          <h3 id={`timeline-day-${day.label}`} className="text-foreground-muted text-xs font-medium">
            {day.label}
          </h3>
          <Timeline aria-labelledby={`timeline-day-${day.label}`}>
            {day.events.map((event) => (
              <TimelineItem key={event.title}>
                <TimelineIndicator />
                <TimelineContent>
                  <div className="flex w-full items-baseline justify-between gap-3">
                    <TimelineTitle>{event.title}</TimelineTitle>
                    <TimelineTime>{event.time}</TimelineTime>
                  </div>
                </TimelineContent>
              </TimelineItem>
            ))}
          </Timeline>
        </div>
      ))}
    </div>
  )
}
```

## RTL [#rtl]

Every Appica UI component supports right-to-left layouts out of the box. Set the `dir` attribute on a container (commonly your `<html>` element) so CSS logical properties resolve correctly, and wrap your tree in `DirectionProvider` so direction-aware behavior follows the same direction.

```tsx
import { DirectionProvider } from '@appica/ui-react/providers/direction-provider'

export default function RootLayout({ children }) {
  return (
    <html lang="ar" dir="rtl">
      <body>
        <DirectionProvider dir="rtl">{children}</DirectionProvider>
      </body>
    </html>
  )
}
```

The markers move to the right edge, a horizontal timeline runs from right to left, and its lines fill in the reading direction. For setup details and caveats, see the [RTL guide](/ui/docs/react/rtl).


## API reference [#api-reference]

Each part forwards every remaining prop to its element (`ol`, `li`, `span`, `div`, `time`). The tables below list the Appica additions and the most common props.

### Timeline [#timeline]

The ordered list. Renders an `<ol>`.

| Prop          | Type  | Default      | Description                                                        |
| ------------- | -------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| `orientation` | `'vertical' \| 'horizontal'` | `'vertical'` | Lay the items out top to bottom, or side by side. A horizontal timeline scrolls when its items don't fit. |
| `size`        | `'sm' \| 'md' \| 'lg'`       | `'md'`       | Scale of the text, the indicators and the spacing between items.                                          |
| `numbered`    | `boolean`                                    | `false`      | Number the indicators that have no content of their own, for a list of steps.                             |
| `aria-label`  | `string`                                     | -            | Name for the list, e.g. `"Order activity"`.                                                               |
| `children`    | `ReactNode`                                  | -            | `TimelineItem`s.                                                                                          |
| `className`   | `string`                                     | -            | Extra classes, merged via `tailwind-merge`.                                                               |

The list exposes `data-orientation`. A horizontal list that overflows also exposes `data-overflowing`, plus `data-overflow-start` and `data-overflow-end` while there's more to scroll toward that edge.

### TimelineItem [#timelineitem]

1 event or step. Renders an `<li>`.

| Prop        | Type                       | Default | Description                                                                              |
| ----------- | ----------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `status`    | `'complete' \| 'current' \| 'pending' \| 'error'` | -       | Progress state of a step. Leave it unset for an event in an activity feed. `current` marks the item with `aria-current="step"`. |
| `children`  | `ReactNode`                                                       | -       | A `TimelineIndicator` and a `TimelineContent`.                                                                                  |
| `className` | `string`                                                          | -       | Extra classes, merged via `tailwind-merge`.                                                                                     |

The item exposes `data-status`.

### TimelineIndicator [#timelineindicator]

The marker, and the line to the next item. Renders a `<span>` for the marker inside a rail that holds the line.

| Prop        | Type                                               | Default | Description                                                                                  |
| ----------- | ----------------------------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `variant`   | `'primary' \| 'secondary' \| 'success' \| 'warning' \| 'error' \| 'info'` | -       | Color of the indicator and of the line after it once the step is complete. Without it, steps use `primary` and events stay neutral. |
| `children`  | `ReactNode`                                                                               | -       | An icon, an `Avatar` or a `Spinner`, in place of the dot, number, check or cross.                                                   |
| `className` | `string`                                                                                  | -       | Extra classes for the marker, merged via `tailwind-merge`.                                                                          |

The marker is 24px at the default size. Set `--timeline-marker` on the `Timeline` for a larger avatar, e.g. `className="[--timeline-marker:--spacing(10)]"`. The line is `data-slot="timeline-connector"`, so `**:data-[slot=timeline-connector]:hidden` on the list removes it.

### TimelineContent [#timelinecontent]

Everything beside the marker. Renders a `<div>`.

| Prop        | Type        | Default | Description                                                  |
| ----------- | ----------- | ------- | ------------------------------------------------------------ |
| `children`  | `ReactNode` | -       | The title, description and time, and any other item content. |
| `className` | `string`    | -       | Extra classes, merged via `tailwind-merge`.                  |

### TimelineTitle [#timelinetitle]

The item's title. Renders a `<div>`.

| Prop        | Type                        | Default | Description                    |
| ----------- | ------------------------------------------------------------------ | ------- | --------------------------------------------------------------------- |
| `render`    | `ReactElement \| ((props, state) => ReactElement)` | -       | Replace the underlying element, or compose it with another component. |
| `children`  | `ReactNode`                                                        | -       | The title text.                                                       |
| `className` | `string`                                                           | -       | Extra classes, merged via `tailwind-merge`.                           |

### TimelineDescription [#timelinedescription]

A muted detail under the title. Renders a `<div>`, so it can hold other blocks.

| Prop        | Type                        | Default | Description                    |
| ----------- | ------------------------------------------------------------------ | ------- | --------------------------------------------------------------------- |
| `render`    | `ReactElement \| ((props, state) => ReactElement)` | -       | Replace the underlying element, or compose it with another component. |
| `children`  | `ReactNode`                                                        | -       | The description.                                                      |
| `className` | `string`                                                           | -       | Extra classes, merged via `tailwind-merge`.                           |

### TimelineTime [#timelinetime]

When the event happened, or how long the step took. Renders a `<time>`.

| Prop        | Type        | Default | Description                                                             |
| ----------- | ----------- | ------- | ----------------------------------------------------------------------- |
| `dateTime`  | `string`    | -       | Machine-readable date or duration, e.g. `2026-12-04T10:41` or `PT1.2S`. |
| `children`  | `ReactNode` | -       | The time as readers see it.                                             |
| `className` | `string`    | -       | Extra classes, merged via `tailwind-merge`.                             |

## Accessibility [#accessibility]

- `Timeline` renders an ordered list, so screen readers announce how many items there are and where each one sits. Name it with `aria-label`, or with `aria-labelledby` pointing at a heading.
- The current step carries `aria-current="step"`.
- Indicators and lines are decorative and hidden from assistive tech. When a status matters, say it in the title or the description too ("Delivered", "Failed").
- Give `TimelineTime` a `dateTime`, so the time is machine-readable.
- A horizontal timeline that overflows becomes a focusable scroll region: Tab to it, then scroll with the arrow keys. It leaves the tab order again once everything fits, and drops its edge fades while focused so the focus ring stays whole.
- With reduced motion, the line fill, the check and the color changes switch without animating, and the jump to the current step is instant.
