StealThis .dev
Pages Medium

Airline — Flight Search

A polished, status-forward flight search panel for the fictional Skyloft Air, built in vanilla HTML, CSS and JavaScript. It pairs Inter with tabular figures for airport codes, times and fares across round-trip, one-way and multi-city tabs, a from and to swap, date pickers, a passenger stepper with cabin selector, inline validation, search toasts, and live recent searches alongside a popular routes grid. Fully responsive down to 360px with an aviation blue and sunrise accent palette.

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

Code

A clean, aviation-styled flight search panel for the fictional Skyloft Air. The hero gives way to a raised search card with trip-type tabs (round trip, one way, multi-city), origin and destination inputs that resolve city names to IATA codes (New York → JFK, London → LHR), a circular swap control, native date pickers, and a passengers-and-cabin popover. Times, flight numbers, codes and fares use tabular figures, and the palette leans on aviation blue with a sunrise-orange accent and clear status pills.

Everything is interactive and vanilla. The swap button trades origin and destination with a satisfying rotation, the trip-type tabs reshape the form — hiding the return date for one-way, and growing into stacked legs with add and remove controls for multi-city. The passenger stepper enforces sensible limits (infants can’t exceed adults), the cabin segment updates the summary label, and the search button validates each leg inline before confirming with a toast. Recent searches record every successful query and can be replayed with a tap, while the popular routes grid pre-fills the form from real-feeling fares.

The layout is mobile-first and responsive down to ~360px: columns stack, the leg grid collapses, and the passenger popover stays within the viewport. Keyboard users get focus rings, Escape closes the popover, and ARIA roles describe the tabs, radio group and live toast region.

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