StealThis .dev

Airline — Trip Itinerary

A multi-leg airline trip itinerary built with vanilla HTML, CSS and JavaScript. It shows a vertical timeline of flight segments with layovers, expandable leg cards exposing terminal, gate, cabin, seat and aircraft details, connection times with tight-layover warnings, large status pills for on-time, boarding and delayed flights, outbound and return tabs, and a manage sheet for changing flights, picking seats, adding bags or cancelling — with toast feedback throughout.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Trip Itinerary

A status-forward itinerary view for a multi-leg round trip. A gradient header summarizes the trip — passengers, segment count, dates and total fare — while two route tabs switch between the outbound and return directions. Each direction renders as a vertical timeline of flight segments separated by layover markers, so a four-flight journey reads as a single connected path.

Every leg is an expandable card: collapsed it shows the airline badge, flight number, departure and arrival times in tabular figures, airport codes, duration and a live status pill (On time, Boarding, Delayed). Expanding a card reveals a fact grid with departure and arrival terminals and gates, cabin and seat assignments, and the operating aircraft. Layover chips display connection time and flag tight connections that require a terminal change, using the sunrise accent for the warning state.

Interactions are pure vanilla JavaScript: smooth grid-row expand/collapse, accessible direction tabs, a Boarding pass action that confirms via toast, and a bottom-sheet Manage menu (change flight, select seat, add bag, cancel segment) that traps focus, closes on Escape or backdrop click, and reports each choice through a small toast helper. The layout is mobile-first and reflows cleanly down to 360px.

Illustrative UI only — fictional airline, not a real booking or flight system.