Class schedule day list — Booking block

Free

booking-class-schedule-day-list · for home, landing, schedule pages

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

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-day-list

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import BookingClassScheduleDayList from '@/components/trame/blocks/booking/booking-class-schedule-day-list.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>
<BookingClassScheduleDayList v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
title*stringWordsthe timetable’s title ("This week’s schedule")
introstringWordsa 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
actionActionthe call to action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Day days[] · 4 props
PropTypeDescription
id*stringDesignthe day’s id, the same as in each class
name*stringWordsthe day in full ("Monday")
shortstringWordsthe day in short ("Mon.")
datestringWordsthe date as the merchant writes it ("12 Oct.")
Classe classes[] · 12 props
PropTypeDescription
id*stringDesignthe class’s id, passed to the book action
day*stringDesignthe id of its day
time*stringWordsthe start ("18:30")
lengthstringWordshow long ("60 min")
name*stringWordsthe class ("Gentle vinyasa")
typestringWordsits kind, used by the filter ("Yoga", "Pilates")
levelstringWordsits level, used by the filter ("Beginner")
coachstringWordswho leads it
roomstringWordswhere, in the studio
spotsnumberthe places left, the merchant’s own figure: never computed
fullbooleanthe class is full
descriptionstringWordsone sentence on the class
Action action · 2 props
PropTypeDescription
label*stringWordsthe book button ("Book")
action*stringActionthe page action that books; it receives the class’s id
Options options · 3 props
PropTypeDescription
eyebrowstringWordsa small line above the heading
notestringWordsa line under the timetable ("Cancellation possible up to 2 h before.")
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa 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).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
Linkyour router’s link component
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour 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:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo 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 @lucide/vue, 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.
  • 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.

All 25 booking blocks