Class schedule week grid — Booking block
Freebooking-class-schedule-week-grid · for home, landing, schedule pages
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
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-class-schedule-week-gridUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import BookingClassScheduleWeekGrid from '@/components/trame/blocks/booking/booking-class-schedule-week-grid.vue'
const props = {
title: "This week’s schedule",
intro: "Book your spot up to two hours before class starts. Mats are provided.",
days: [
{
id: "lun",
name: "Monday",
short: "Mon.",
date: "Oct 12"
},
{
id: "mar",
name: "Tuesday",
short: "Tue.",
date: "Oct 13"
}
],
classes: [
{
id: "c1",
day: "lun",
time: "7:30 a.m.",
name: "Morning vinyasa",
type: "Yoga",
level: "All levels",
coach: "Leah",
room: "Bright room",
length: "60 min",
spots: 6
},
{
id: "c2",
day: "lun",
time: "12:30 p.m.",
name: "Pilates express",
type: "Pilates",
level: "Beginner",
coach: "Hugo",
room: "Studio 2",
length: "45 min",
spots: 3
}
],
action: {
label: "Book",
action: "class.book"
},
options: {
eyebrow: "Group classes",
note: "Free cancellation up to two hours before class."
}
}
</script>
<template>
<BookingClassScheduleWeekGrid v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe timetable’s title ("This week’s schedule") |
| intro | string | Wordsa sentence on how to book, cancel or arrive |
| days* | Day[] | the days of the week shown, in order |
| classes* | Classe[] | the merchant’s own classes of the week |
| 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 |
Day days[] · 4 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designthe day’s id, the same as in each class |
| name* | string | Wordsthe day in full ("Monday") |
| short | string | Wordsthe day in short ("Mon.") |
| date | string | Wordsthe date as the merchant writes it ("12 Oct.") |
Classe classes[] · 12 props
| Prop | Type | Description |
|---|---|---|
| id* | string | Designthe class’s id, passed to the book action |
| day* | string | Designthe id of its day |
| time* | string | Wordsthe start ("18:30") |
| length | string | Wordshow long ("60 min") |
| name* | string | Wordsthe class ("Gentle vinyasa") |
| type | string | Wordsits kind, used by the filter ("Yoga", "Pilates") |
| level | string | Wordsits level, used by the filter ("Beginner") |
| coach | string | Wordswho leads it |
| room | string | Wordswhere, in the studio |
| spots | number | the places left, the merchant’s own figure: never computed |
| full | boolean | the class is full |
| description | string | Wordsone sentence on the class |
Action action · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe book button ("Book") |
| action* | string | Actionthe page action that books; it receives the class’s id |
Options options · 3 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa small line above the heading |
| note | string | Wordsa line under the timetable ("Cancellation possible up to 2 h before.") |
| 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
- 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, schedule pages; it uses class-variance-authority, clsx, reka-ui, tailwind-merge.
More booking blocks
- 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.
- 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.
- Curriculum path: a course that is a progression: modules numbered along a path, from the first step to the last.
- Demo split: a B2B landing page’s "book a demo" section: why the call is worth it and who leads it on one side, the booking card (day, time, details) on the other.