SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

TripTimeline

A whole trip on one vertical timeline.

  1. Day 1 · Merrow → Vellis
    1. Flight: LW 214 Merrow → Vellis

      Confirmed
      • Terminal 2 · Gate B14 · Seat 14C
      • Confirmation LWX4Q2
    2. Car: Pick up at Tallow Rent

      Confirmed
      • Vellis Airport, arrivals hall
      • Compact · Velo C3 or similar
    3. Stay: Check in at Hotel Saltmarsh

      Pay at hotel
      • 12 Quay Row, Vellis
      • 5 nights · Double room
  2. Day 2 · Vellis
    1. Activity: Harbour walking tour

      • Meet at the lighthouse steps · 2h
    2. Note: Pack a light jacket for the evening

View code
tsx
<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.

Terminal
npm add @sdxc/ui remix
typescript
import "@sdxc/ui/theme.css";

Usage

typescript
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.

  • TripTimeline
  • TripTimeline.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.

PropTypeRequiredDescription
kindLabelsPartial<Record<Kind, string>>NoHidden words read before an item's title in place of its icon, such as { flight: "Flight", stay: "Stay" }.
levelHeadingLevelNoThe heading level of every day; the ambient level, then 3, when left out.
childrenRemixNodeYesThe TripTimeline.Day items.

Also accepts everything in TagProps<"ol">.

TripTimeline.Day

PropTypeRequiredDescription
headingRemixNodeYesThe day, formatted, such as "Fri 14 Mar".
datestringNoA machine-readable date for the <time> the heading sits in, such as "2026-03-14".
detailRemixNodeNoMuted words after the heading, such as "Day 1 · Merrow".
childrenRemixNodeYesThe TripTimeline.Item entries.

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

TripTimeline.Item

PropTypeRequiredDescription
kind"flight" | "stay" | "car" | "activity" | "note"Yes
iconRemixNodeNoA glyph in place of the kind's own.
timeRemixNodeNoWhen it happens, formatted, such as "08:40" or "Check-in from 15:00".
dateTimestringNoA machine-readable moment for the <time> the time sits in.
titleRemixNodeYesWhat it is, such as "LW 214 Merrow → Vellis".
detailsRemixNode[]NoLines under the title, such as a terminal, a confirmation code or an address.
statusRemixNodeNoA status at the title's end, such as a <Badge> reading "Confirmed".
actionsRemixNodeNoLinks or buttons under the item, such as "Add to calendar".
childrenRemixNodeNoAnything else under the details, such as a small map or a note.

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

Types

NameValuesWhat it decides
Kind"flight" | "stay" | "car" | "activity" | "note"What an item is, which picks its icon and tone.
@sdxc/ui

Can’t find it? Contact us