Event replay on demand — Hero block
Prohero-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-demandUsage
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.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe event’s name, as the organiser calls it |
| kicker | string | Wordswhat kind of event it is, in a few words ("Craft trades meetings") |
| startsAt* | string | Datathe first day, as the organiser set it (ISO date): the only source of every date shown |
| endsAt | string | Datathe last day when the event lasts more than one, as the organiser set it |
| place | string | Wordswhere it happens, as the organiser wrote it ("Halle Tony Garnier, Lyon") |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| recap* | string | Wordsone sentence on how the event went, for a past event with a recording |
| replayAction | ReplayAction | watch the recording ("Watch the replay"): leads the on-demand variant; without it that variant is a recap with no button |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
ReplayAction replayAction · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Book my place") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Options options · 3 props
| Prop | Type | Description |
|---|---|---|
| alt | string | Wordsthe picture’s description, when it shows something the title does not say |
| asOf | string | Designthe 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' | 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 |
| asset | a picture’s address as your app serves it |
| 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 |
|---|---|---|
| event.date | Date | Date |
| event.day | day to go | jour avant le début |
| event.days | days to go | jours avant le début |
| event.inDay | in 1 day | dans 1 jour |
| event.inDays | in {n} days | dans {n} jours |
| event.place | Place | Lieu |
| event.replay | On demand | En replay |
| event.time | Hours | Horaires |
| event.today | Today | Aujourd’hui |
| 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
- 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.