TripTimeline
A whole trip on one vertical timeline.
- Day 1 · Merrow → Vellis
Flight: LW 214 Merrow → Vellis
Confirmed- Terminal 2 · Gate B14 · Seat 14C
- Confirmation LWX4Q2
Car: Pick up at Tallow Rent
Confirmed- Vellis Airport, arrivals hall
- Compact · Velo C3 or similar
Stay: Check in at Hotel Saltmarsh
Pay at hotel- 12 Quay Row, Vellis
- 5 nights · Double room
- Day 2 · Vellis
Activity: Harbour walking tour
- Meet at the lighthouse steps · 2h
Note: Pack a light jacket for the evening
View code
<TripTimeline aria-label="Trip to Vellis" kindLabels={{ flight: "Flight", stay: "Stay", car: "Car" }}>
<TripTimeline.Day heading="Fri 14 Mar" date="2026-03-14" detail="Day 1 · Merrow → Vellis">
<TripTimeline.Item
kind="flight"
time="08:40"
title="LW 214 Merrow → Vellis"
details={["Terminal 2 · Gate B14", "Confirmation LWX4Q2"]}
status={<Badge color="success" variant="secondary">Confirmed</Badge>}
actions={<a href="/trip/lw214.ics">Add to calendar</a>}
/>
<TripTimeline.Item kind="car" time="11:30" title="Pick up at Tallow Rent" … />
<TripTimeline.Item kind="stay" time="15:00" title="Check in at Hotel Saltmarsh" … />
</TripTimeline.Day>
</TripTimeline>Installation
An ordinary dependency: install it, import the theme once, and import the component where it is used.
npm add @sdxc/ui remiximport "@sdxc/ui/theme.css";Usage
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.
Composition
The parts the component publishes, each a static property of the host.
TripTimelineTripTimeline.DayRenders 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.TripTimeline.ItemRenders 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.
Props
Read from the component's own types, so every prop, every default and every allowed value is listed.
| Prop | Type | Required | Description |
|---|---|---|---|
kindLabels | Partial<Record<Kind, string>> | No | Hidden words read before an item's title in place of its icon, such as { flight: "Flight", stay: "Stay" }. |
level | HeadingLevel | No | The heading level of every day; the ambient level, then 3, when left out. |
children | RemixNode | Yes | The TripTimeline.Day items. |
Also accepts everything in TagProps<"ol">.
TripTimeline.Day
| Prop | Type | Required | Description |
|---|---|---|---|
heading | RemixNode | Yes | The day, formatted, such as "Fri 14 Mar". |
date | string | No | A machine-readable date for the <time> the heading sits in, such as "2026-03-14". |
detail | RemixNode | No | Muted words after the heading, such as "Day 1 · Merrow". |
children | RemixNode | Yes | The TripTimeline.Item entries. |
Also accepts everything in Omit<TagProps<"li">, "children">.
TripTimeline.Item
| Prop | Type | Required | Description |
|---|---|---|---|
kind | "flight" | "stay" | "car" | "activity" | "note" | Yes | |
icon | RemixNode | No | A glyph in place of the kind's own. |
time | RemixNode | No | When it happens, formatted, such as "08:40" or "Check-in from 15:00". |
dateTime | string | No | A machine-readable moment for the <time> the time sits in. |
title | RemixNode | Yes | What it is, such as "LW 214 Merrow → Vellis". |
details | RemixNode[] | No | Lines under the title, such as a terminal, a confirmation code or an address. |
status | RemixNode | No | A status at the title's end, such as a <Badge> reading "Confirmed". |
actions | RemixNode | No | Links or buttons under the item, such as "Add to calendar". |
children | RemixNode | No | 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. |