Product introduction stats grid — Hero block
Prohero-product-introduction-stats-grid · for home, landing, app pages
Product introduction stats grid
Four figures the merchant states in a bordered grid: a track record is the argument
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-product-introduction-stats-gridUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import HeroProductIntroductionStatsGrid from '@/components/trame/blocks/hero/hero-product-introduction-stats-grid.vue'
const props = {
title: "Dress shoes you repair instead of throwing away",
subtitle: "Hand-stitched in our workshop and resoleable for ten years. Every pair comes back to us when it wears down.",
checklist: [
"Vegetable-tanned leather",
"Flat-rate resoling"
],
primaryAction: {
label: "Explore the collection",
action: "collection"
},
secondaryAction: {
label: "How it works",
action: "page",
record: {
id: "atelier"
}
},
rating: {
value: "4.8 / 5",
label: "based on our customers’ reviews",
avatars: [
{
name: "Customer 1",
alt: "A smiling customer"
},
{
name: "Customer 2",
alt: "A smiling customer"
}
]
},
panel: {
stats: [
{
value: "12,400",
label: "pairs repaired"
},
{
value: "10 years",
label: "average lifespan"
}
],
steps: [
{
title: "Choose your pair",
text: "Three lasts, eight leathers, half sizes included."
},
{
title: "We make it",
text: "Allow three weeks in the workshop."
}
]
},
options: {
eyebrow: "Made in the USA",
note: "Free shipping on orders over $100",
panelTitle: "Your first week"
}
}
</script>
<template>
<HeroProductIntroductionStatsGrid v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe promise, in a sentence |
| subtitle | string | Wordswhat it is and for whom, in one or two sentences |
| checklist | string[] | Wordsone thing the visitor gets, a few words |
| 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 |
| rating | Rating | the rating, as the merchant states it |
| panel* | Panel | the panel beside the words: figures or a picture |
| 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 ("Try for 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 ("Try for free") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Rating rating · 3 props
| Prop | Type | Description |
|---|---|---|
| value* | string | Wordsthe rating as the merchant states it ("4.8 / 5") |
| label* | string | Wordswhat it rests on ("from 1,200 customer reviews") |
| avatars | Avatar[] | a few real customers’ pictures beside the rating |
Avatar rating.avatars[] · 3 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordsthe avatar’s name |
| alt* | string | Wordswho the picture shows |
| src | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
Panel panel · 2 props
| Prop | Type | Description |
|---|---|---|
| stats | Stat[] | the panel’s stats, in order |
| steps | Step[] | the panel’s steps, in order |
Stat panel.stats[] · 2 props
| Prop | Type | Description |
|---|---|---|
| value* | string | Wordsthe figure as stated ("12,400") |
| label* | string | Wordswhat it counts |
Step panel.steps[] · 2 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe step’s title |
| text | string | Wordsthe step’s text |
Options options · 6 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa short chip above the title |
| note | string | Wordsfine print under the actions |
| panelTitle | string | Wordsthe heading of a steps or stats panel ("Your first hour") |
| flip | boolean | true: swaps the sides |
| background | 'aurora' | 'pattern' | 'none' | the section’s background: aurora, pattern, 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 home, landing, app pages; it uses @lucide/vue, 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
- Marquee rows: the promise centred above two full-width rows of pictures sliding slowly in opposite directions (one row under six pictures), still below the expressive level: a studio, a maker or a shop whose body of work is the argument (the merchant’s own work or products only).
- Ornament: a type-led opening with no integrations to show: the words at one corner of a large drawn object, purely decorative.
- Photo request: a tall picture with the form panel overlapping it: a workshop, a venue or a service whose place sells the request.
- Portrait: a person-led brand: the portrait with an availability dot beside the intro, the clients’ logos passing under it at the expressive level (a still row below it) — the merchant’s own only.
- Preorder: a limited run in preorder: the price and deposit, how many are reserved, and the production timeline.
- Product slides framed card: a rounded frame inside the page’s margins, the words at its top left and the product card floating at the bottom right with the arrows beside it: a quieter shop, or a header that never overlays.
- Product slides fullbleed card: pictures edge to edge, the words on the calm side and the campaign’s product on a card at the other, arrows at the edges: a shop whose scenes sell and whose first click should land on a product.
- Profile facts: a studio or freelancer opening: who, what and a few key facts, with the recognitions they earned in a card beside — the merchant’s own only.