Trip departures cards — Booking block

Pro

booking-trip-departures-cards · for product, landing pages

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

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-trip-departures-cards

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import BookingTripDeparturesCards from '@/components/trame/blocks/booking/booking-trip-departures-cards.vue'

const props = {
title: "Choose your departure",
lead: "Groups of eight travelers at most, led by a certified guide. Dates and spots are set by the agency.",
trip: "Crossing the Smoky Mountains in seven days",
book: "trip.book",
footnote: "The price includes lodging with breakfast and dinner, luggage transfers and your guide. It doesn’t include travel to the starting point or lunches.",
options: {
priceNote: "per person"
},
departures: [
{
id: "d1",
dates: "April 12–19, 2027",
month: "April 2027",
price: 129000,
status: "guaranteed",
note: "Departs from Knoxville",
guide: "Camille"
},
{
id: "d2",
dates: "April 26 – May 3, 2027",
month: "April 2027",
price: 129000,
status: "open",
note: "Departs from Knoxville",
guide: "Camille"
}
]
}
</script>

<template>
<BookingTripDeparturesCards v-bind="props" />
</template>

Props

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

PropTypeDescription
title*stringWordswhat the visitor does ("Choose your departure")
leadstringWordsone sentence under the title
tripstringWordsthe trip’s name ("Crossing the Cévennes in 7 days")
departures*Departure[]Datathe trip’s departures, in date order
book*stringActionthe page action that books a departure; it receives the departure
footnotestringWordswhat the price includes or leaves out, as the agency states it
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Departure departures[] · 8 props
PropTypeDescription
id*string | numberDatathe departure’s id in the tool that answers it
dates*stringWordsthe departure and return dates as the agency writes them ("12 – 19 April 2027")
monthstringWordsthe month the departure belongs to ("April 2027"), to group them; departures of one month follow each other
price*numberthe price per traveller in cents
previousPricenumberthe price before the agency’s reduction, in cents
status*'open' | 'few-left' | 'waitlist' | 'full' | 'guaranteed'open: places left; few-left: the agency says few places remain; waitlist: full but a list is open; full: closed; guaranteed: the departure is confirmed
notestringWordswhat the agency says of this departure ("4 places", "Departing from Geneva")
guidestringWordsthe guide’s first name or name, as the agency shows it
Options options · 2 props
PropTypeDescription
priceNotestringWordswhat the price is per ("per person")
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
moneyformats a price, given in cents
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: book
  • Reads departures from your app

A booking section, for product, landing pages; it uses @lucide/vue, class-variance-authority, clsx, reka-ui, tailwind-merge.

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.
  • 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.
  • Table steps: a short wizard, when then who, with a recap of the choice: for a phone, where one thing at a time is easier.
  • Venue split: the dining room’s picture beside the form: for a place that sells its atmosphere before its slots.

All 25 booking blocks