Appointment steps — Booking block
Freebooking-appointment-steps · for home, landing, service pages
Appointment steps
A visitor on a phone, or a long list of services: one question at a time, from service to contact
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-appointment-stepsUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import BookingAppointmentSteps from '@/components/trame/blocks/booking/booking-appointment-steps.vue'
const props = {
title: "Book an appointment",
intro: "Pick your service, your stylist and a time slot. We’ll confirm by email.",
services: [
{
id: "coupe",
name: "Cut & blow-dry",
description: "Shampoo, a cut tailored to you, and styling.",
duration: "1 hr",
price: 5500,
from: true
},
{
id: "couleur",
name: "Root color",
description: "A tone-on-tone color with a strengthening treatment.",
duration: "1 hr 30 min",
price: 6800,
from: true
}
],
practitioners: [
{
id: "ines",
name: "Ivy",
role: "Hairstylist and colorist",
serviceIds: [
"coupe",
"couleur"
]
},
{
id: "malo",
name: "Malo",
role: "Hairstylist",
serviceIds: [
"coupe",
"soin"
]
}
],
days: [
{
id: "d14",
weekday: "Tue",
day: "14",
month: "Oct",
label: "Tuesday, October 14",
slots: [
{
id: "d14-0",
time: "9:00 AM",
practitionerId: "ines"
},
{
id: "d14-1",
time: "10:30 AM",
practitionerId: "ines"
}
]
},
{
id: "d15",
weekday: "Wed",
day: "15",
month: "Oct",
label: "Wednesday, October 15",
slots: [
{
id: "d15-0",
time: "9:30 AM",
practitionerId: "malo"
},
{
id: "d15-1",
time: "10:00 AM",
practitionerId: "ines"
}
]
}
],
action: {
label: "Confirm appointment",
action: "appointment.book"
},
options: {
eyebrow: "Online booking",
note: "Free cancellation up to 24 hours before your appointment.",
notesField: true
}
}
</script>
<template>
<BookingAppointmentSteps 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 an appointment") |
| intro | string | Wordsa sentence on how it works: confirmation, changes, cancellation |
| services* | Service[] | the services that can be booked |
| practitioners | Practitioner[] | the people the visitor may book with |
| days* | Day[] | the days offered, a week or two, with their free slots |
| fields | Field[] | the trade’s own questions, the merchant’s words: one to three, asked with the contact details (a vehicle for a garage, an animal for a vet, the job’s address for a plumber) |
| action* | Action | 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 |
Service services[] · 6 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designthe service’s id, posted with the booking |
| name* | string | Wordsthe service ("Cut & blow-dry") |
| description | string | Wordswhat it includes, in a sentence |
| duration | string | Wordshow long, as the merchant writes it ("1 h") |
| price | number | the price in cents |
| from | boolean | the price is a starting price |
Practitioner practitioners[] · 6 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designthe person’s id, posted with the booking |
| name* | string | Wordsthe practitioner’s name |
| role | string | Wordswhat they do ("Colourist") |
| avatar | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the picture shows |
| serviceIds | string[] | Designthe services they offer; all of them when absent |
Day days[] · 6 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designthe day’s key |
| weekday* | string | Words"Mon." |
| day* | string | Wordsthe number, "14" |
| month | string | Words"Oct." |
| label* | string | Wordsthe day in full ("Monday 14 October"), read in the summary |
| slots* | Slot[] | the free times of the day, the merchant’s own |
Slot days[].slots[] · 3 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designthe slot’s id, posted with the booking |
| time* | string | Wordsthe start, as shown ("14:30") |
| practitionerId | string | Designwho is free then; anyone when absent |
Field fields[] · 5 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Designthe name the answer is posted under, e.g. "vehicle"; never one of the form’s own names (service, practitioner, day, slot, name, email, phone, notes) |
| label* | string | Wordsthe question, as the trade asks it ("Vehicle (model, plate)") |
| hint | string | Wordsan example shown in the empty field ("Ford Focus, AB12 CDE") |
| long | boolean | the answer takes several lines (a text area) rather than one |
| required | boolean | the visitor must answer it to book |
Action action · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe confirm button ("Confirm the appointment") |
| action* | string | Actionthe page action that receives the booking (posted as a form: service, practitioner when there are practitioners ("any" for no preference), day (days[].id), slot (days[].slots[].id), then each of fields[].name, name, email, phone, and notes when options.notesField) |
Options options · 5 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa small line above the heading |
| note | string | Wordsthe policy, under the button ("Free cancellation up to 24 h before.") |
| anyLabel | string | Wordsthe "no preference" choice ("No preference") |
| notesField | boolean | show a free-text field for the visitor’s requests (allergies, wishes), posted as "notes"; absent by default |
| 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 |
| asset | a picture’s address as your app serves it |
| 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, landing, service pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, reka-ui, tailwind-merge.
More booking blocks
- Availability engagement table: An offer ledger with status and next start, the merchant's own dates only.
- Availability quarter cards: Period cards with supplied capacity bars, the merchant's own slots only.
- Availability statement: A capacity statement with concise cells, the merchant's own availability only.
- Availability timezone bars: Working-hour rows on a shared day axis, the merchant's own hours and timezone labels only.
- 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.