Stage deck — Hero block
Freehero-stage-deck · for home, landing pages
Stage deck
The promise at the start and, at the end, a slightly tilted desktop window on two fanned cards with a phone overlapping its corner (the second view in its mobile layout), no tab row: a product used on desktop and on the phone alike, two views that tell it; figures and messages in the window are the merchant’s own only.
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-stage-deckUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import HeroStageDeck from '@/components/trame/blocks/hero/hero-stage-deck.vue'
const props = {
eyebrow: "New: deposits for large tables",
title: "Seat the room, fire the tickets, settle the bill, all from one screen",
lead: "Passline runs a restaurant’s night: bookings, guest messages and payments that talk to each other.",
primaryAction: {
label: "Start free",
action: "signup"
},
secondaryAction: {
label: "Book a demo",
action: "demo"
},
tabs: [
{
label: "Tonight",
visual: {
kind: "chart",
title: "Tonight",
label: "Sales, last 30 days",
value: 182340,
prefix: "$",
delta: "+9% vs. last month",
points: [
41,
44
],
axis: [
"Oct 1",
"Oct 8"
],
floats: [
{
kind: "notice",
title: "Table 12 paid",
text: "Party of 6 · $486",
tone: "success"
},
{
kind: "figure",
label: "Covers tonight",
value: 148,
delta: "+22"
}
]
}
},
{
label: "Bookings",
visual: {
kind: "list",
title: "Friday",
rows: [
{
label: "Table 4 · Okafor, party of 2",
meta: "7:00 pm · Window",
status: "Confirmed",
tone: "success"
},
{
label: "Table 12 · Lindqvist, party of 6",
meta: "7:30 pm · Counter",
status: "Running late",
tone: "warning"
}
],
floats: [
{
kind: "message",
name: "Mara, guest",
text: "Could the cake come out at 9?"
}
]
}
}
],
options: {
note: "Free for 30 days, no credit card needed",
mood: "inverse"
}
}
</script>
<template>
<HeroStageDeck v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa short chip above the title ("New: online booking") |
| title* | string | Wordsthe one promise, in a sentence (60 to 90 characters at most): the page’s h1 |
| lead | string | Wordswhat it is and for whom, in one or two sentences |
| 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 |
| tabs* | Tab[] | 1 to 5 views of the product in one window; a sixth is never shown, one alone shows no tab row |
| picture | string | Picturea picture the product window sits on (a painting, a soft photograph), under a light veil; without it, a coloured panel |
| 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 ("Start free") |
| 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 ("Start free") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Tab tabs[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe view’s job in one to three words ("Schedule", "Inbox") |
| visual* | Visual | Visual | Visual | Visual | Visual | Visual | Visual | Visual | the product view this tab shows, as a mini-interface |
Options options · 3 props
| Prop | Type | Description |
|---|---|---|
| note | string | Wordsfine print under the actions ("No credit card needed") |
| tone | 'brand' | 'primary' | 'accent' | the colour family of the backdrop behind the window; brand by default |
| 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 home, landing pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More hero blocks
- Split image: a plain picture beside the words, with an optional caption card: a product or a place seen at first glance — the merchant’s own only.
- Split notched: the words above one wide landscape picture whose corners are cut out as notches holding the actions and the caption: an architect, a venue, a hotel whose one strong picture should feel cut into the page — the merchant’s own only.
- Split price card: one plan or one price with what it includes: a single offer sold straight away — the merchant’s own only.
- Split quote: one testimonial of the merchant’s own as the proof beside the promise.
- Store aisles: a large promise and picture with the shop’s categories as a strip of links under it: a catalogue with several ranges to enter by.
- Store mosaic: the promise beside a mosaic of the shop’s picture and its first four categories as picture tiles, the featured products as a short priced list under the words: a shop with a few strong ranges, each with a good picture.
- Tour board below: the same promise centred, then a wide board across the whole window under it, toured the same way: a range to see as a whole first, wider than tall, for an opening that leads with the words (the host’s own work only).
- Tour board side: the promise at the start and, on the other side to the window’s edge, a flat masonry board of the host’s pieces that a camera tours at the expressive level (steps back, comes close on one, holds, moves on): a studio, a shop or a library whose range is the argument and wants the words read beside it (the host’s own work only).