Event replay on demand — Hero block

Pro

hero-event-replay-on-demand · for landing, event, home pages

Event replay on demand

A past event: a one-line recap and the replay action, never a register button; without a replay it is the recap alone

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/hero-event-replay-on-demand

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import HeroEventReplayOnDemand from '@/components/trame/blocks/hero/hero-event-replay-on-demand.vue'

const props = {
title: "Craft Makers Gathering",
kicker: "Two days of open workshops and conversations",
startsAt: "2025-10-18",
endsAt: "2025-10-19",
place: "Carpenters Hall, Portland, OR",
image: "https://images.unsplash.com/photo-1791298043001-d6488112d8da?w=1600&q=80",
recap: "More than twenty open workshops, demonstrations all day long and conversations with the people who make things.",
replayAction: {
label: "Watch the replay",
action: "replay"
},
options: {
alt: "People around a workshop table, brushes and markers in hand",
asOf: "2026-10-12"
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe event’s name, as the organiser calls it
kickerstringWordswhat kind of event it is, in a few words ("Craft trades meetings")
startsAt*stringDatathe first day, as the organiser set it (ISO date): the only source of every date shown
endsAtstringDatathe last day when the event lasts more than one, as the organiser set it
placestringWordswhere it happens, as the organiser wrote it ("Halle Tony Garnier, Lyon")
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
recap*stringWordsone sentence on how the event went, for a past event with a recording
replayActionReplayActionwatch the recording ("Watch the replay"): leads the on-demand variant; without it that variant is a recap with no button
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
ReplayAction replayAction · 3 props
PropTypeDescription
label*stringWordswhat happens ("Book my place")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Options options · 3 props
PropTypeDescription
altstringWordsthe picture’s description, when it shows something the title does not say
asOfstringDesignthe day the page is rendered (ISO date) for the distance to the start; when absent the browser counts it once loaded, and the server writes none
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
event.dateDateDate
event.dayday to gojour avant le début
event.daysdays to gojours avant le début
event.inDayin 1 daydans 1 jour
event.inDaysin {n} daysdans {n} jours
event.placePlaceLieu
event.replayOn demandEn replay
event.timeHoursHoraires
event.todayTodayAujourd’hui
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
  • Expressive motion, within its budget; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: replayAction

A hero section, for landing, event, home pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.

More hero blocks

  • Duo offset: two columns at different heights on the page’s own ground, each title large above its picture and the product riding the picture’s edge: an editorial, magazine-like opening for two entries of equal weight.
  • Event countdown: the days left to the start, from the organiser’s date, beside the register button: an event within a few weeks.
  • Event date led: the date in very large numerals beside the title and place, one picture band beneath: a one- or two-day event.
  • Event poster: the title set as a poster over a picture, the details in a ruled strip below: a festival, an exhibition, a season.
  • Figures stat band: a number is the argument: a bordered band of three to five figures the merchant states.
  • Finder: a product choice that needs a few questions: the first question shown, the real finder one click away.
  • Float deck: the title set on the left and the pictures fanned on the right like a hand of cards, the first product in front: 2 to 4 products with one to lead, a more personal, collected opening.
  • Float orbit: the title above, the pictures in a gentle arc under it, the middle one largest: 2 to 4 products, a calmer opening.

All 102 hero blocks