Duo full panels — Hero block
Prohero-duo-full-panels · for home pages
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
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-duo-full-panelsUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import HeroDuoFullPanels from '@/components/trame/blocks/hero/hero-duo-full-panels.vue'
const props = {
panels: [
{
image: "https://images.unsplash.com/photo-1714836986273-9a62b37f55fa?w=1600&q=80",
alt: "A wooden table set with two gray plates and dish towels",
title: "The everyday table",
action: {
label: "See tableware",
action: "collection",
record: {
id: "table"
}
},
product: {
id: "bols-gres",
name: "Speckled stoneware bowls, set of two",
price: 3800,
image: "https://images.unsplash.com/photo-1530006498959-b7884e829a04?w=480&q=80",
alt: "Two speckled white stoneware bowls stacked on a dark background"
}
},
{
image: "https://images.unsplash.com/photo-1578500494198-246f612d3b3d?w=1600&q=80",
alt: "A light brown sofa with a gray throw and pampas grass in a vase",
title: "A softer living room",
action: {
label: "See home linens",
action: "collection",
record: {
id: "salon"
}
},
product: {
id: "plaid-laine",
name: "Wool throw",
price: 8900,
compareAt: 9900,
image: "https://images.unsplash.com/photo-1756361771520-8711a9ff4668?w=480&q=80",
alt: "Rolled wool throws"
}
}
],
options: {
eyebrow: "Home · new season"
}
}
</script>
<template>
<HeroDuoFullPanels v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| panels* | Panel[] | exactly two equally strong entries (two categories, two campaigns); with one, use HeroSignature |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Panel panels[] · 5 props
| Prop | Type | Description |
|---|---|---|
| image | string | Picturethe entry’s scene, a tall picture; without one the panel is a brand tint |
| alt | string | Wordswhat the picture shows (empty: decorative) |
| title* | string | Wordsthe entry’s promise, 2 to 6 words ("The summer table"); the first one is the page’s h1 |
| action | Action | the panel’s call to action: its words and the page action |
| product* | Product | Dataone product of this entry to start from, from the catalogue tool |
Action panels[].action · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("See the table") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens (a category, a collection) |
Product panels[].product · 7 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe record’s id in the tool that answers it |
| name* | string | Wordsthe product’s name |
| price* | number | an amount in cents |
| compareAt | number | the price before the merchant’s reduction |
| currency | string | DesignISO 4217, EUR by default |
| image | string | null | Picturethe main picture; null or absent: the product has none yet |
| alt | string | Wordswhat the main picture shows |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa short line over both entries ("New season") |
| 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 |
| money | formats a price, given in cents |
| 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:
panels[].action - Reads
productsfrom your app
A hero section, for home pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
More hero blocks
- Colorways swatch stage: the title centred over a wide stage holding the chosen colour, the swatches in a pill at its foot and the chosen piece’s card in its corner: a shop that opens on one piece whose colours are the news (a new dye, a season’s palette).
- Comparison versus: an honest comparison with the usual alternative, row by row, the source stated by the merchant.
- Diagram fan: a platform with many connections: centred words and a still fan of thin lines from the product to the tools below.
- 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.
- 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.
- 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.