← All Components
<mth-seat-map>
Form-associated 2D ARIA grid seat picker supporting multi-select, seat tiers, and validation.
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Ready · interact with <mth-seat-map>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/maps/seat-map"></script>
<mth-seat-map columns="4" multiple></mth-seat-map>import '@methane-ui/maps/seat-map';
import '@methane-ui/react';
export function Example() {
return <mth-seat-map columns="4" multiple></mth-seat-map>;
}<script setup lang="ts">
import '@methane-ui/maps/seat-map';
</script>
<template>
<mth-seat-map columns="4" multiple></mth-seat-map>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/maps/seat-map';
import { MthSeatMapDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthSeatMapDirective],
template: `<mth-seat-map columns="4" multiple></mth-seat-map>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/maps/seat-map';
import MthSeatMap from '@methane-ui/svelte/MthSeatMap.svelte';
</script>
<MthSeatMap columns="4" multiple></MthSeatMap>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
name | name | string | "" | Form field name. |
value | value | string | "" | Comma-separated selected seat identifiers. |
defaultValue | default-value | string | "" | Default reset seat value. |
seats | — | ReadonlyArray<unknown> | — | Array of SeatDefinition entries. |
columns | columns | number | 4 | Number of grid columns used for row layout. |
multiple | multiple | boolean | true | Allows selecting multiple seats. |
required | required | boolean | false | Requires at least one selected seat. |
disabled | disabled | boolean | false | Disables interaction and submission. |
readOnly | readonly | boolean | false | Prevents changing seat selection. |
label | label | string | "" | Accessible field label. |
Events
| Event | Detail Type | Description |
|---|---|---|
input | undefined | Native composed event fired when selection changes. |
change | undefined | Native composed event fired when selection commits. |
mth-seat-select | { selectedIds: ReadonlyArray<string>; seat: unknown } | Fired when an available seat is toggled. |
APG Keyboard Matrix
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| ArrowLeft | ltr | seat gridcell focused | Moves focus left by 1 seat |
| ArrowRight | ltr | seat gridcell focused | Moves focus right by 1 seat |
| ArrowUp | both | seat gridcell focused | Moves focus up by 1 row |
| ArrowDown | both | seat gridcell focused | Moves focus down by 1 row |
| Enter | both | seat gridcell focused | Toggles or selects focused available seat |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | delegatesFocus: true with zero host internals.role (ADR-014). | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| keyboard | Implements all 5 APG keyboard transitions across LTR/RTL. | mth-seat-map.spec.test.ts |
| states | Exposes ElementInternals CustomStateSet flags: :state(disabled), :state(readonly), :state(invalid), :state(dirty), :state(touched), :state(multiple). | Conformance suite |
| i18n | Routes 12 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |