flightcn

FlightAirport

Component 115

About

Renders a single airport marker with optional labels, custom marker UI, and click callbacks.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds FlightAirport to your project and fits it to your theme.

Code

How FlightAirport is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { FlightAirport, Map } from "@/components/ui/flightcn-flight-airport";

export default function DefaultFlightAirportDemo() {
  return (
    <div className="flex min-h-screen w-full items-center justify-center overflow-hidden bg-background p-8">
      <div className="h-[420px] w-full max-w-4xl overflow-hidden rounded-lg border bg-background shadow-sm">
        <Map center={[128, 29]} zoom={2.35}>
          <FlightAirport code="TPE" showLabel={true} labelPosition="top" />
          <FlightAirport code="HND" showLabel={true} labelPosition="top" />
          <FlightAirport code="ICN" showLabel={true} labelPosition="top" />
        </Map>
      </div>
    </div>
  );
}

export { DefaultFlightAirportDemo };

Dependencies

More by flightcn

View all
  • Departures Board

    Departures Board

    39
  • FlightMultiRoute

    FlightMultiRoute

    28
  • FlightRoutes

    FlightRoutes

    27
  • SatelliteOrbit

    SatelliteOrbit

    16