# TripTimeline

> A whole trip on one vertical timeline: days under headings, and within each day a flight, stay, car, activity or note per item, each with its icon on a connecting rail, its time, title, detail lines, a status slot and an actions slot.

```ts
import { TripTimeline } from "@sdxc/ui/travel";
```

Renders the trip as an `<ol>` of days. Under 30rem each item's time sits over its title; wider,
times take a column before the rail so a day reads down like a schedule.

## Examples

```tsx
<TripTimeline aria-label="Trip to Vellis" kindLabels={{ flight: "Flight", stay: "Stay" }}>
	<TripTimeline.Day heading="Fri 14 Mar" date="2026-03-14" detail="Day 1">
		<TripTimeline.Item kind="flight" time="08:40" title="LW 214 Merrow → Vellis" status={<Badge>Confirmed</Badge>} />
		<TripTimeline.Item kind="stay" time="15:00" title="Check in at Hotel Saltmarsh" />
	</TripTimeline.Day>
</TripTimeline>
```

## Props

| Prop | Type | Description |
| --- | --- | --- |
| `kindLabels?` | `Partial<Record<Kind, string>>` | Hidden words read before an item's title in place of its icon, such as `{ flight: "Flight", stay: "Stay" }`. |
| `level?` | `HeadingLevel` | The heading level of every day; the ambient level, then 3, when left out. |
| `children` | `RemixNode` | The TripTimeline.Day items. |

Also accepts everything in `TagProps<"ol">`.


### TripTimeline.Day

Renders one day: a heading at the ambient level (its date in a `<time>`) with muted detail beside it, then the day's items in their own ordered list on one rail.

| Prop | Type | Description |
| --- | --- | --- |
| `heading` | `RemixNode` | The day, formatted, such as "Fri 14 Mar". |
| `date?` | `string` | A machine-readable date for the `<time>` the heading sits in, such as "2026-03-14". |
| `detail?` | `RemixNode` | Muted words after the heading, such as "Day 1 · Merrow". |
| `children` | `RemixNode` | The TripTimeline.Item entries. |

Also accepts everything in `Omit<TagProps<"li">, "children">`.


### TripTimeline.Item

Renders one booked item: a round marker with the kind's icon on the rail, which runs on to the next item's marker, then the time, the title with its status, detail lines and actions.

| Prop | Type | Description |
| --- | --- | --- |
| `kind` | `"flight" \| "stay" \| "car" \| "activity" \| "note"` |  |
| `icon?` | `RemixNode` | A glyph in place of the kind's own. |
| `time?` | `RemixNode` | When it happens, formatted, such as "08:40" or "Check-in from 15:00". |
| `dateTime?` | `string` | A machine-readable moment for the `<time>` the time sits in. |
| `title` | `RemixNode` | What it is, such as "LW 214 Merrow → Vellis". |
| `details?` | `RemixNode[]` | Lines under the title, such as a terminal, a confirmation code or an address. |
| `status?` | `RemixNode` | A status at the title's end, such as a `<Badge>` reading "Confirmed". |
| `actions?` | `RemixNode` | Links or buttons under the item, such as "Add to calendar". |
| `children?` | `RemixNode` | Anything else under the details, such as a small map or a note. |

Also accepts everything in `Omit<TagProps<"li">, "children" | "title">`.


## Types

| Name | Values | What it decides |
| --- | --- | --- |
| `Kind` | `"flight" \| "stay" \| "car" \| "activity" \| "note"` | What an item is, which picks its icon and tone. |
