Itinerary timeline — Events block

Pro

events-itinerary-timeline · for product, landing, home pages

Itinerary timeline

A thin vertical line of days with a small picture each: a long trip read quickly, many days

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/events-itinerary-timeline

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import EventsItineraryTimeline from '@/components/trame/blocks/events/events-itinerary-timeline.vue'

const props = {
title: "Four days between lake and peaks",
intro: "A small-group walking trip, from hut to bivouac, with a certified guide. Nothing technical: just good shoes and a will to walk.",
highlights: [
{
label: "Duration",
value: "4 days, 3 nights"
},
{
label: "Distance",
value: "22 mi"
}
],
days: [
{
title: "From the village to the first hut",
date: "Saturday, July 12",
text: "We leave the village in the cool of the morning, on a trail that climbs in the shade of the larches to the first hut.",
places: [
{
name: "Starting village",
text: "Welcome, gear check, coffee."
},
{
name: "Stone bridge",
text: "A break by the stream.",
leg: "1.2 mi, 40 min"
}
],
activities: [
"Forest climb",
"Picnic at the stone bridge"
],
distance: "5.6 mi",
duration: "4 hours of walking",
overnight: {
name: "Larch Hut",
text: "12-bed dorm, dinner included."
},
image: "https://images.unsplash.com/photo-1562593028-1fe2d15bde36?w=1600&q=80",
alt: "A hiker on a stone path between fir trees"
},
{
title: "The pass and the ridge",
date: "Sunday, July 13",
text: "The finest day: a pass at 7,550 ft, then a ridge open onto the whole valley.",
places: [
{
name: "Croisette Pass",
text: "Views down both sides.",
leg: "3.1 mi, 2 hr 15 min"
},
{
name: "Marmot Ridge",
text: "An easy walk along a balcony trail.",
leg: "1.9 mi, 1 hr"
}
],
activities: [
"Climbing the pass",
"Lunch on the ridge"
],
distance: "8.7 mi",
duration: "6 hours of walking",
overnight: {
name: "Lakeside bivouac",
text: "Tents provided, dinner cooked by the guide."
},
image: "https://images.unsplash.com/photo-1576176539998-0237d1ac6a85?w=1600&q=80",
alt: "Two tents pitched in a meadow above a lake"
}
],
included: [
"A certified guide for the whole trip",
"All three nights, in a hut, a bivouac and a lodge"
],
excluded: [
"Travel to the starting village",
"Packed lunches"
],
action: {
label: "See departure dates",
action: "trip.dates",
record: {
id: "lac-sommets"
}
},
options: {
eyebrow: "Hut-to-hut trip"
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe trip’s name ("Four days between lake and peaks")
introstringWordswhat the trip is, in two sentences
highlightsHighlight[]the trip’s key facts, each a label and a value, e.g. "Duration"
days*Day[]Datathe trip day by day, as the organiser planned it
includedstring[]Wordswhat the price includes
excludedstring[]Wordswhat the price does not include
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
Highlight highlights[] · 2 props
PropTypeDescription
label*stringWordswhat it measures ("Duration")
value*stringWordsas the organiser wrote it ("4 days")
Day days[] · 11 props
PropTypeDescription
title*stringWordsthe day in a few words ("From the village to the lake")
labelstringWordsthe day’s name when "Day 1" is not right ("Arrival", "Days 3 and 4")
datestringWordsthe date as written, when the trip has fixed dates
textstringWordswhat the day is about, in two sentences
placesPlace[]the day’s stops, in order
activitiesstring[]Wordsone activity ("Swimming in the lake")
distancestringWordsthe day’s distance, as written ("18 km")
durationstringWordsthe day’s duration, as written ("6 h walking")
overnightOvernightwhere the night is spent
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the picture shows
Place days[].places[] · 3 props
PropTypeDescription
name*stringWordsthe place ("Croisette pass")
textstringWordsone sentence on what a traveller does or sees there
legstringWordshow to get there from the previous stop, as the organiser wrote it ("3 km, 40 min on foot")
Overnight days[].overnight · 2 props
PropTypeDescription
name*stringWordswhere the night is spent
textstringWordswhat it is ("12-bed lodge, dinner included")
Action action · 3 props
PropTypeDescription
label*stringWordswhat happens ("See the dates")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe trip the action opens
Options options · 2 props
PropTypeDescription
eyebrowstringWordswhat kind of trip it is ("Roaming trip")
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
asseta picture’s address as your app serves it
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 events section, for product, landing, home pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.

More events blocks

  • Calendar split: a recurring programme: events grouped by date on the left, a month grid and the list of places on the right; the merchant’s own only.
  • Invitation band: a band with the title, the dates, up to three points and one button: a single event to push; the merchant’s own only.
  • Invitation split: the hosts and the words left, a card with the date, the hours and a one-field form right: one event to fill; the merchant’s own only.
  • Launch dates timeline: a horizontal timeline of four steps with their state: the dates of a launch or a registration period; the merchant’s own only.
  • Ledger dates: a plain, poster-like list: oversized day numerals at the left of hairline rows, nothing else to look at; the merchant’s own only.
  • Registration sidebar: one event page: its agenda and hosts on the left, a sticky card on the right with the date, the place, the register and calendar actions; the merchant’s own only.
  • Release calendar dated list: several dated releases to come: the form beside a calendar of them — the merchant’s own only.
  • Retrospective gallery: the pictures and figures of the past edition, then the next date: what happened, and what comes next; the merchant’s own only.

All 23 events blocks