---
title: "Flight Seat Map"
description: "3D aircraft cabin for picking seats on a booking: the floor tips away like a view down the aisle, every seat stands with a seatback, headrest, screen and tray, and taken seats show heads over the seatbacks. Rows, aisles, exit rows and skipped rows come from a layout prop, and a passenger's head pops up over the seat they pick while it reclines. Arrow keys move across the grid, and a summary totals the seat prices."
category: "Blocks"
publishedAt: "2026-12-02"
updatedAt: "2026-12-02"
documentation: "https://beui.dev/components/blocks/flight-seat-map"
markdown: "https://beui.dev/components/blocks/flight-seat-map.md"
license: "MIT"
---

# Flight Seat Map

> 3D aircraft cabin for picking seats on a booking: the floor tips away like a view down the aisle, every seat stands with a seatback, headrest, screen and tray, and taken seats show heads over the seatbacks. Rows, aisles, exit rows and skipped rows come from a layout prop, and a passenger's head pops up over the seat they pick while it reclines. Arrow keys move across the grid, and a summary totals the seat prices.

## Install

```bash
npx shadcn@latest add @beui/flight-seat-map
```

## Dependencies

- `@floating-ui/dom`
- `clsx`
- `lucide-react`
- `motion`
- `react`
- `react-dom`
- `tailwind-merge`

## Usage

```tsx
"use client";

import { useState } from "react";
import {
  FlightSeatMap,
  type SeatMapLayout,
  type SeatPassenger,
  type SeatSelection,
} from "@/components/motion/flight-seat-map";

const layout: SeatMapLayout = {
  columns: ["A", "B", "C", "", "D", "E", "F"],
  sections: [
    { from: 1, to: 2, type: "premium", price: 89 },
    { from: 3, to: 4, type: "extra-legroom", price: 39 },
    { from: 5, to: 12, type: "standard" },
  ],
  exitRows: [4],
};

const passengers: SeatPassenger[] = [
  { id: "p1", name: "Maya Chen" },
  { id: "p2", name: "Leo Park" },
];

const taken = ["1A", "2E", "3C", "4F", "5A", "5B", "6E", "7C", "7D", "8F", "9B", "10A", "10E", "11C", "12D", "12F"];

export function FlightSeatMapPreview() {
  const [seats, setSeats] = useState<SeatSelection>({ p1: "3B", p2: null });

  return (
    <div className="w-full max-w-4xl">
      <FlightSeatMap
        layout={layout}
        passengers={passengers}
        taken={taken}
        value={seats}
        onChange={setSeats}
        sound
      />
    </div>
  );
}
```

## API Reference

### FlightSeatMap

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `layout` | `SeatMapLayout` |  | Yes | The cabin layout: seat columns, aisles, sections, exit rows and skipped rows. |
| `passengers` | `SeatPassenger[]` |  | Yes | Everyone who needs a seat. One passenger makes it a single-seat picker. |
| `taken` | `string[]` | `[]` | No | Seat ids that are already taken, such as ["3C", "12A"]. |
| `value` | `SeatSelection` |  | No | Selected seats, for controlled use. |
| `defaultValue` | `SeatSelection` | `{}` | No | Selected seats at first, when uncontrolled. Default: {} |
| `onChange` | `((value: SeatSelection) => void)` |  | No | Called with the whole selection whenever a passenger's seat changes. |
| `currency` | `string` | `USD` | No | ISO 4217 currency code for seat prices. Default: "USD" |
| `tilt` | `number` | `42` | No | How far the cabin floor tips away from the viewer, in degrees. 0 draws it flat from above. Default: 42 |
| `sound` | `boolean` | `false` | No | Play a pop when a head lands in a seat, a flick when a seat is given up, a click when switching passengers and a buzz on a taken seat. Off by default; a `SoundProvider` can mute it app-wide. Default: false |
| `labels` | `Partial<{ map: string; row: string; aisleColumn: string; seat: string; window: string; middle: string; aisle: string; standard: string; "extra-legroom": string; premium: string; available: string; taken: string; ... 10 more ...; hint: string; }>` |  | No | Override any built-in string. |
| `className` | `string` |  | No | Classes merged onto the root element. |

## Types

### SeatMapLayout

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `columns` | `string[]` | Yes | Seat letters from left to right; an empty string marks an aisle, e.g. ["A", "B", "C", "", "D", "E", "F"]. |
| `sections` | `SeatSection[]` | Yes | Row ranges from front to back. Rows not covered by a section are not drawn. |
| `exitRows` | `number[]` | No | Rows with an emergency exit beside them, marked in green at both edges of the cabin floor. |
| `skipRows` | `number[]` | No | Row numbers the airline skips, such as 13. |

### SeatPassenger

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | Stable id, used as the key in the selection map. |
| `name` | `string` | Yes | Name shown in the switcher, the summary and seat labels. |

### SeatSection

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `from` | `number` | Yes | First row number in the section. |
| `to` | `number` | Yes | Last row number in the section, inclusive. |
| `type` | `SeatType` | No | Seat type for every seat in these rows. Default: "standard" |
| `price` | `number` | No | Price of each seat in these rows, in the `currency` unit. Leave out or pass 0 for seats included in the fare. |

## About Flight Seat Map

Flight Seat Map is an airline seat selection component for React, built with Framer Motion and Tailwind CSS. The cabin is drawn in 3D: the floor tips away from you like a view down the aisle, every seat is a cushion, padded armrests and a seatback with a winged headrest, screen, tray table and seat pocket, and travellers already seated show as heads over the seatbacks. You describe the cabin once: seat letters with aisles between them, row ranges with a seat type and price, exit rows and rows the airline skips. Seats show as available, taken, extra legroom or premium. Picking a passenger in the summary chooses who you are seating, and a head with their initials pops up over the seat they pick while it reclines and a ring spreads over the floor. Moving seats sinks the head in one and raises it in the next, then the next passenger without a seat is picked for you. The seats stand up row by row when the cabin scrolls into view, and hovering or focusing a seat shows a tooltip with its number, position, type and price. Set sound to hear a pop when a head lands in a seat, a flick when it is given up and a buzz on a taken seat. A summary lists each passenger's seat, position and price with a running total.

### When to use it

- A flight, train or bus booking flow lets travellers pick their own seats.
- A group booking needs one seat per passenger, with paid seats added to the total.
- You need a seat grid for a cinema, venue or classroom with rows, aisles and taken seats.

### Accessibility

The map is a grid with one tab stop. Arrow keys move between seats, Up and Down keep the seat letter, Home and End jump to the ends of the row, Ctrl with Home or End to the first or last seat, and Page Up and Page Down move 5 rows. Each seat is a button named with its number, position, type, price and status, such as Seat 12A, Window, Standard, Included, Available. Taken seats stay focusable so they are announced, but cannot be chosen. Each passenger in the summary is a toggle button, pressed for the one being seated. A polite live region announces each seat chosen or removed. With reduced motion the seats stand from the start, and heads fade in place.

### FAQ

**How do I describe a wide-body cabin?**

Put an empty string wherever an aisle runs, such as ["A", "C", "", "D", "E", "F", "G", "", "H", "K"] for a 2-4-2 layout. Window, middle and aisle positions are worked out from it.

**Can I use it for a single traveller?**

Yes. Pass one passenger and the summary row stops being a switcher. The value is still a map from passenger id to seat id, so { p1: "12A" }.

**What happens when I click a seat another passenger holds?**

That passenger becomes the one you are seating, so you can move them. Clicking the active passenger's own seat removes it.

## Source

- Registry detail: https://beui.dev/r/flight-seat-map
- Raw source: https://beui.dev/r/flight-seat-map/raw
- GitHub: https://github.com/starc007/ui-components
