Availability engagement table — Booking block
Probooking-availability-engagement-table · for contact, about pages
Availability engagement table
An offer ledger with status and next start, the merchant's own dates only.
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-availability-engagement-tableUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import BookingAvailabilityEngagementTable from '@/components/trame/blocks/booking/booking-availability-engagement-table.vue'
const props = {
title: "Let’s take the time to plan your project",
slots: [
{
id: "creation",
period: "Custom work",
state: "Ask us",
response: "The timeline takes shape after a first conversation."
},
{
id: "restauration",
period: "Restoration",
state: "By appointment",
response: "Bring photographs of your piece."
}
],
cta: {
label: "Talk about the project",
action: "contact"
}
}
</script>
<template>
<BookingAvailabilityEngagementTable v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe section’s heading |
| slots* | Slot[] | Datathe periods and how much is still available in each |
| cta | Cta | the call to action: its words and the page action it runs |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Slot slots[] · 10 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Datathe slot’s id |
| period* | string | Wordsthe period, e.g. "This week" |
| state* | string | Wordswhere it stands, in the merchant’s words, e.g. "Two places left" |
| next | string | Wordswhen the next opening is, as the merchant writes it |
| remaining | number | how many places are still free |
| capacity | number | how many places the period holds in all |
| response | string | Wordshow fast the merchant answers in this period, e.g. "Reply within 24 h" |
| hours | string | Wordsits hours, as the merchant writes them |
| startHour | number | the hour it starts, 0 to 24 |
| endHour | number | the hour it ends, 0 to 24 |
Cta cta · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe words on the button or link |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action applies to, passed to the host with it, if any |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| 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 |
| Link | your router’s link component |
| 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
- No motion; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
cta - Reads
slotsfrom your app
A booking section, for contact, about pages; it uses class-variance-authority, clsx, reka-ui, tailwind-merge.
More booking blocks
- Appointment one page: a small salon with a short list: everything on one page and the summary always in view.
- Appointment practitioner first: clients who book a person rather than a treatment (hairdresser, therapist, coach): choose who first, the services and slots follow.
- Appointment steps: a visitor on a phone, or a long list of services: one question at a time, from service to contact.
- Class agenda: the whole week as one scrolling agenda grouped by date, with the studio’s picture: the week told as a story.
- Class schedule day list: a visitor on a phone, or a few classes a day: one day at a time, each class with room to breathe.
- Class schedule week grid: a studio with a full week of classes: every day side by side, the rhythm of the week seen at once.
- Curriculum accordion: a long programme read module by module: real disclosures, the first open, what you will learn and the teacher beside.
- Curriculum columns: a short programme seen at a glance: every module as a card with its lessons visible.