← Floor Plan EditorInteractive Floor Plan

Getting started

@ticketss/interactive-floor-plan renders a buyer-facing map from a saved FloorPlanDocument produced by the editor.

import { InteractiveFloorPlan } from "@ticketss/interactive-floor-plan";
import "@ticketss/floor-plan-editor/styles/tokens.css";
import "@ticketss/interactive-floor-plan/styles/interactive.css";

<div style={{ width: "100%", height: "60dvh" }}>
  <InteractiveFloorPlan
    document={floorPlan}
    selectedIds={selectedIds}
    onSelectionChange={setSelectedIds}
    onPick={(pick) => console.log(pick)}
    isDarkMode
  />
</div>

Back to Floor Plan Editor docs · Edit Floor Plan docs

Package API

PropTypeDescription
documentFloorPlanDocumentRead-only floor plan JSON from the organizer editor
selectedIdsstring[]Controlled selection state (seats, tables, GA zones)
onSelectionChange(ids) => voidCalled when the user picks or clears seats/zones
availabilityAvailabilityMapHost overlay for sold / held / locked inventory
onPick(InteractivePick) => voidResolved pick metadata for cart / analytics
onPickRejected(PickRejectedEvent) => voidUnavailable target clicked
isDarkModebooleanMaps to data-theme on the root
canvasBackgroundColorstringCanvas background hex color (controlled)
onCanvasBackgroundColorChange(color) => voidCalled when the user changes canvas background via the picker
stylesInteractiveFloorPlanStylesOptional chrome and seat selection color overrides

Display & fit

Picking

Availability

Mock availability for the live preview (host app supplies real inventory in production):

Style customization

Pass styles with keys root, canvas, zoomToolbar, zoomButton, zoomLabel, backgroundPicker, backgroundPickerSwatch, tooltip, and seatSelection for selected seat fill/stroke on the canvas.

seatSelection.fill and seatSelection.stroke accept a single color string or { light, dark } objects resolved using isDarkMode.

styles={{
  seatSelection: {
    fill: { light: "#2563EB", dark: "#22D3EE" },
    stroke: { light: "#1E40AF", dark: "#0891B2" },
  },
  zoomToolbar: { backgroundColor: "rgba(0,0,0,0.6)" },
}}