Event date led — Hero block
Prohero-event-date-led · for landing, event, home pages
Event date led
The date in very large numerals beside the title and place, one picture band beneath: a one- or two-day event
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-date-ledUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import HeroEventDateLed from '@/components/trame/blocks/hero/hero-event-date-led.vue'
const props = {
title: "Low Tide Festival",
kicker: "Three days of music on the beach, 40 artists, two stages",
startsAt: "2027-08-13",
endsAt: "2027-08-15",
place: "North Beach, Port Haven",
image: "https://images.unsplash.com/photo-1790511637969-5864152f9e38?w=1600&q=80",
primaryAction: {
label: "Get a 3-day pass",
action: "register",
record: {
id: "pass-3-days"
}
},
secondaryAction: {
label: "See the lineup",
action: "programme"
},
options: {
time: "2 p.m. – midnight",
alt: "The beach stage at dusk, pink lights over the crowd and the sea behind",
asOf: "2026-10-12",
mood: "inverse"
}
}
</script>
<template>
<HeroEventDateLed 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 |
| primaryAction* | PrimaryAction | the main button: its words and the page action it runs |
| secondaryAction | SecondaryAction | a quieter second action beside the main one: its words and the page action |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
PrimaryAction primaryAction · 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 |
SecondaryAction secondaryAction · 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 · 4 props
| Prop | Type | Description |
|---|---|---|
| time | string | Wordsthe hours as the organiser wrote them ("9 am – 6 pm") |
| 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 |
|---|---|---|
| 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:
primaryAction,secondaryAction
A hero section, for landing, event, home pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
More hero blocks
- Diagram hub: a product that plugs into the tools a buyer already has: the words beside a hub with its real integrations, joined by a moving beam.
- Duo framed captions: two rounded frames on a dark band, a product card on each picture and the title with its link under the frame: a quieter, gallery-like opening.
- Duo full panels: two tall pictures edge to edge, each title large over its foot and a product chip in its corner: a shop with two strong scenes that opens on two doors.
- 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 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.
- 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.