Table inline — Booking block
Probooking-table-inline · for home, booking, landing pages
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
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-table-inlineUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import BookingTableInline from '@/components/trame/blocks/booking/booking-table-inline.vue'
const props = {
title: "Book a table for your year-end dinner, with colleagues or family",
intro: "Choose the day, the number of guests and the time. We’ll confirm by email.",
days: [
{
id: "2026-10-14",
label: "Wed, Oct 14",
services: [
{
id: "dejeuner",
name: "Lunch",
hours: "12–2:30 p.m.",
slots: [
{
time: "12:00"
},
{
time: "12:15"
}
]
},
{
id: "diner",
name: "Dinner",
hours: "7–10 p.m.",
slots: [
{
time: "19:00"
},
{
time: "19:30"
}
]
}
]
},
{
id: "2026-10-15",
label: "Thu, Oct 15",
services: [
{
id: "dejeuner",
name: "Lunch",
hours: "12–2:30 p.m.",
slots: [
{
time: "12:00"
},
{
time: "12:15"
}
]
},
{
id: "diner",
name: "Dinner",
hours: "7–10 p.m.",
slots: [
{
time: "19:00"
},
{
time: "19:30",
full: true
}
]
}
]
}
],
party: {
min: 1,
max: 8,
initial: 2
},
action: "book-table",
actionLabel: "Book my table",
options: {
eyebrow: "Restaurant",
place: "The City-Hall-and-Old-Market-Halls Brasserie, 12 Old-Grain-Market Street",
largeGroupNote: "For more than 8 people, write to us: we’ll put together a menu for your group.",
policy: "We hold your table for 15 minutes. Free cancellation up to 2 hours before.",
requestsHint: "Allergy, birthday, high chair…"
}
}
</script>
<template>
<BookingTableInline v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe heading ("Book your table") |
| intro | string | Wordsone or two sentences under it ("We hold your table for 15 minutes.") |
| days* | Day[] | Datathe days that can be booked, with their services and the slots the restaurant offers; the restaurant’s own, never computed |
| party* | Party | the size of a party the form accepts |
| action* | string | Actionthe page action that receives the request (posted as a form: date, service, time, party, name, email, phone, requests) |
| actionLabel | string | Wordswhat the button says ("Book my table") |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Day days[] · 4 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designthe date, posted as the chosen date ("2026-10-17") |
| label* | string | Wordsthe day as the visitor reads it ("Fri. 17 Oct.") |
| closed | boolean | the restaurant is closed this day: shown, disabled |
| services* | Service[] | the day’s services, e.g. lunch and dinner |
Service days[].services[] · 4 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designposted as the chosen service |
| name* | string | Wordsthe service’s name ("Lunch", "Dinner") |
| hours | string | Wordsits hours, as written ("12 pm – 2:30 pm") |
| slots* | Slot[] | the times that can be booked in this service |
Slot days[].services[].slots[] · 2 props
| Prop | Type | Description |
|---|---|---|
| time* | string | Wordsthe time, as the restaurant writes it ("19:30", "7:30 pm"); posted as the chosen time |
| full | boolean | no table left at this time: the slot stays shown, disabled |
Party party · 3 props
| Prop | Type | Description |
|---|---|---|
| min* | number | the smallest party that can book |
| max* | number | the largest party that can book |
| initial | number | the party size chosen first |
Options options · 6 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa small line above the heading |
| place | string | Wordsthe place’s name and address, as written ("The Counter, 12 Market Street") |
| largeGroupNote | string | Wordswhat the restaurant says for a party above the maximum ("Over 8 people, call us on …") |
| policy | string | Wordsthe restaurant’s terms ("Free cancellation up to 2 h before.") |
| requestsHint | string | Wordsthe example in the requests field ("Allergy, birthday, high chair…") |
| 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 |
| 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:
action
A booking section, for home, booking, landing pages; it uses @lucide/vue, @vueuse/core, 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.
- Seat plan: a venue drawn as a simple plan: zones to pick, then their tiers: a hall where where you sit matters.
- 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.
- Trip departures table: a table with dates, status, guide and price, grouped by month: many departures to compare line by line, a season of one trip.