Routes, live tracking, networks, trails and satellite orbits — built with MapLibre and mapcn.
npx shadcn@latest add @flightcn/flightflightcn gives you flight visualization components you own. Start with two IATA codes, add airport labels, animate an aircraft, or build a complete route network.
- Built to work with
mapcn - Type-compatible with both maplibre-gl v5 and v6
- Render airports and routes directly from IATA codes like
TPE,HND, andLAX - Great-circle arc rendering with antimeridian handling
- Support for single routes, multiple routes, and multi-leg journeys
- Controlled live-flight tracking with completed and remaining route segments
- Weighted flight networks, geodesic range bands, and route annotations
- Recorded aircraft trails with recent-position emphasis and animated traffic flow
- Globe-based satellite orbit overlays with ground tracks and animated markers
- Custom satellite SVG marker support for orbital visualizations
- Optional airport labels, hover states, and route animation
- Built-in airport registry with
code,name,city,country,latitude, andlongitude - 11 prebuilt blocks — dashboards, route pickers, traffic flows, and orbit trackers — installable with one shadcn command
- Interactive playground for composing visualizations and copying the generated React code
- Step-by-step recipes — live flight tracker, airline route map, and flight history map, each with a demo and full code
Add the flight components from the shadcn registry:
npx shadcn@latest add @flightcn/flightThe registry item depends on mapcn, so the required map component will also be pulled in through the registry dependency chain.
Installed files:
components/ui/flight.tsxcomponents/ui/flight-airports.tscomponents/ui/flight-airports-utils.tscomponents/ui/flight-visualizations.tsx
Add the satellite overlay component from the shadcn registry:
npx shadcn@latest add @flightcn/satelliteInstalled files:
components/ui/satellite-orbit.tsx
After installing from the shadcn registry, import the generated local Map and FlightRoute components, then render a route with airport markers:
import { Map } from "@/components/ui/map";
import { FlightRoute } from "@/components/ui/flight";
export default function Demo() {
return (
<div className="h-screen w-screen">
<Map className="h-full w-full" center={[121.5, 25]} zoom={3}>
<FlightRoute from="TPE" to="LAX" showAirports showLabel />
</Map>
</div>
);
}Render a single airport marker from an IATA code or custom coordinates.
Render one route between two airports. Use this for the common point-to-point case.
Render multiple independent routes in one map. Use this when each route should remain separate.
Render a single journey across multiple waypoints. Use this when one trip should connect several legs in sequence.
Track one flight with controlled progress, split completed/remaining paths, aircraft heading, and operational details.
Place fixed labels at a percentage along a great-circle route, or use mode="aircraft" to show a plane with a horizontal label that follows it along the route. Supports optional route-aligned rotation and sm, md, or lg sizing.
Render a weighted airport network with scalable routes and nodes plus connected-route focus interactions. Each route's optional value is a relative weight: higher values produce thicker routes and contribute more to the size of both connected airport nodes. It defaults to 1.
Draw one or more true geodesic distance bands from an airport or coordinate. Use a globe projection for long ranges when geographic shape matters; Mercator intentionally distorts high-latitude circles.
Draw ordered recorded positions as a fading actual flight path with a current-aircraft marker, optional smooth altitudeColorStops, and a dashed continuation to a destination or explicit planned waypoints. Automatic destination routes support adjustable plannedCurvature.
Show multiple aircraft sharing weighted routes as either a live animated traffic flow or a static traffic snapshot. Route value controls relative aircraft density, while an optional per-route aircraftCount sets an exact count.
Render a single globe-based orbital path with an animated satellite marker, ground track, and optional custom SVG icon.
Render multiple orbital overlays from one dataset while sharing animation, connector, and label behavior.
Prebuilt, full-page examples composed from flightcn components. Browse them at flightcn.yencheng.dev/blocks, then install any block with the shadcn CLI:
npx shadcn@latest add @flightcn/flight-tracker-dashboard| Block | Description |
|---|---|
flight-route-picker |
Search airports, explore featured routes, and arrange multi-stop journeys with distance and time estimates |
flight-tracker-dashboard |
Live flight progress beside an operations card with altitude, speed, and a playback scrubber |
airline-network-dashboard |
Weighted hub-and-spoke network with a ranked destination sidebar and two-way highlighting |
airport-search-map |
Searchable panel over the built-in airport database with fly-to markers |
aircraft-trail-replay |
Recorded track replay with an altitude-graded trail and dashed planned continuation |
flight-ops-overview |
Operations dashboard with live KPI cards, a multi-flight map, and an en-route sidebar |
live-traffic-flow |
Animated aircraft flowing along weighted global corridors with density presets |
departures-board |
Status-filterable departure list that draws the selected flight on the map |
aircraft-range-explorer |
Compare aircraft reach from a departure airport with labeled range boundaries |
network-coverage-grid |
Region-filtered coverage map with two-way selection between stat cards and markers |
satellite-orbit-tracker |
Multi-satellite constellation on a globe with visibility toggles and orbital metadata |
Step-by-step guides for the things people actually build with flightcn — each ships a live demo, the data format, and the full component to copy:
- How to build a live flight tracker in React — a controlled
FlightTrackerfed by any flight data API, with an OpenSky adapter example - How to build an airline route map in React — a weighted hub-and-spoke network with
FlightNetworkand click-to-inspect selection - How to visualize your flight history in React — draw a year of flights with
FlightRoutesand compute flights, airports, countries, and distance from the same log
Compose visualizations live at flightcn.yencheng.dev/playground — stack routes, trackers, networks, and trails on one map, tune every prop, and copy the generated React code. Share any composition with a copyable view-only link, or tune orbits in the satellite playground.
The built-in dataset is sourced from OurAirports and bundled locally in this project.
Current AirportInfo fields:
codenamecitycountrylatitudelongitude
- Flight docs: flightcn.yencheng.dev/docs/flight
- Satellite docs: flightcn.yencheng.dev/docs/satellite
- Flight install guide: flightcn.yencheng.dev/docs/install/flight
- Satellite install guide: flightcn.yencheng.dev/docs/install/satellite
- Blocks: flightcn.yencheng.dev/blocks
- Playground: flightcn.yencheng.dev/playground
- Satellite playground: flightcn.yencheng.dev/satellite-playground
- Registry homepage: flightcn.yencheng.dev
For local development:
pnpm install
pnpm devUseful commands:
pnpm lint
pnpm build
pnpm registry:build
pnpm formatMIT License - see the LICENSE file for details.


