Seat plan — Booking block
Probooking-seat-plan · for product, landing, event pages
Seat plan
A venue drawn as a simple plan: zones to pick, then their tiers: a hall where where you sit matters
Documentation
Installation
One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).
pnpm dlx shadcn-vue@latest add @trame/booking-seat-planUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import BookingSeatPlan from '@/components/trame/blocks/booking/booking-seat-plan.vue'
const props = {
title: "Book your seats",
lead: "An evening of songs by candlelight, in the old factory’s vaulted hall.",
event: {
name: "Songs in the Workshop night",
when: "Saturday, March 14, 8:30 p.m.",
where: "The Factory Hall, Portland, OR",
image: "https://images.unsplash.com/photo-1791298043001-d6488112d8da?w=1000&q=80",
alt: "People around a workshop table, with pencils and markers in front of them"
},
tiers: [
{
id: "plein",
name: "Full price",
price: 2800,
description: "Open seating in the hall.",
includes: [
"A drink at intermission"
],
zone: "orchestre",
max: 8
},
{
id: "reduit",
name: "Reduced price",
price: 1800,
description: "Under 26, students and job seekers, with proof.",
zone: "orchestre",
max: 4
}
],
zones: [
{
id: "scene",
name: "Front row",
shape: "strip",
x: 22,
y: 21,
w: 56,
h: 13
},
{
id: "orchestre",
name: "Orchestra",
shape: "block",
x: 12,
y: 38,
w: 76,
h: 25
}
],
orderAction: "tickets",
options: {
eyebrow: "Concert",
fees: "Service fees included in the price shown.",
submitLabel: "Book"
}
}
</script>
<template>
<BookingSeatPlan v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordswhat the visitor does ("Book your places") |
| lead | string | Wordsone sentence on the event, as the organiser says it |
| event | Event | the event: its name, date and place |
| tiers* | Tier[] | the ticket tiers, each with its price and zone |
| zones* | Zone[] | the venue’s zones, as on the seating plan |
| orderAction* | string | Actionthe page action that receives the quantities (posted by the form) |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Event event · 5 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordsthe event’s name |
| when* | string | Wordsits date and time as the organiser wrote them ("Saturday 14 March, 8:30 pm") |
| where | string | Wordsthe venue and city |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the picture shows |
Tier tiers[] · 10 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designthe tier’s identifier, posted with its quantity |
| name* | string | Wordsthe tier’s name ("Full price") |
| price* | number | an amount in cents |
| description | string | Wordswho it is for or what it includes |
| includes | string[] | Wordsone thing the tier includes |
| zone | string | Designthe id of the plan zone this tier gives access to (variant seated) |
| soldOut | boolean | the tier has no places left, as the organiser says |
| left | number | places left, only when the organiser chooses to show it |
| min | number | the fewest a visitor may take of this tier (a group rate), when the organiser sets one |
| max | number | the most a visitor may take of this tier |
Zone zones[] · 7 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designthe zone’s identifier, the same as a tier’s `zone` |
| name* | string | Wordsthe zone’s name ("Stalls", "Balcony") |
| shape* | 'stage' | 'block' | 'ring' | 'strip' | how the zone is drawn on the plan |
| x* | number | left edge, in percent of the plan |
| y* | number | top edge, in percent of the plan |
| w* | number | width, in percent of the plan |
| h* | number | height, in percent of the plan |
Options options · 4 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsthe kind of event ("Concert") |
| fees | string | Wordswhat the price includes or leaves out, as the organiser states it ("Service fee included") |
| submitLabel | string | Wordsthe button’s words ("Book") |
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a band of the page that redefines the theme surfaces inside it |
What it asks your app for
The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| money | formats a price, given in cents |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your word for an interface key, or undefined to keep the block’s own |
The words it says itself, in English and French; label(key) replaces any of them:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too many attempts, try again in a moment. | Trop de tentatives, réessayez dans un moment. |
Features
- Every word in the server HTML
- Same markup in Vue and React
- Theme tokens only: every theme, light and dark
- Shows what you give it, invents nothing
- Subtle motion: one short reveal; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
orderAction
A booking section, for product, landing, event pages; it uses @lucide/vue, class-variance-authority, clsx, reka-ui, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More booking blocks
- Demo stacked: a dedicated demo page or the closing section of a long landing page: a centred promise, the points in one ruled row, then a wide booking panel with the days down its side.
- Room picker cards: rooms as photo cards, the rate picked inside the card: a small hotel with three or four rooms that sell by the picture.
- Room picker compare: rooms side by side in a table, amenities ticked row by row: a hotel whose rooms differ by surface and comfort.
- Room picker list: each room on a row with its photo, its details and its rates side by side: a hotel with many room types and several rates each.
- Table inline: the whole booking on one panel inside the page: when on one side, who on the other, for a restaurant whose visitors know what they want.
- Table steps: a short wizard, when then who, with a recap of the choice: for a phone, where one thing at a time is easier.
- Trip departures cards: a rail of one card per departure with its dates large: a handful of departures, each one told with its note and guide.
- Trip departures months: one column per month with its departures stacked, like a calendar: choosing by season when departures spread over several months.