Product overview poster panel — Storefront block
Freestorefront-product-overview-poster-panel · for product pages
Product overview poster panel
The first picture as a wide panel carrying the product’s one-line summary, its story and three of its highlights, a narrow buy box beside it and the other facts in a band under both: a single-product shop or a hero product whose page should read like a landing
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/storefront-product-overview-poster-panelUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontProductOverviewPosterPanel from '@/components/trame/blocks/storefront/storefront-product-overview-poster-panel.vue'
const props = {
product: {
id: "trail-sentier",
name: "Trail Path running shoe",
brand: "Summit Workshop",
price: 12900,
compareAt: 15900,
currency: "USD",
image: "https://images.unsplash.com/photo-1575987116913-e96e7d490b8a?w=1600&q=80",
images: [
"https://images.unsplash.com/photo-1575987116913-e96e7d490b8a?w=1600&q=80",
"https://images.unsplash.com/photo-1530792271526-7ddf516473b3?w=1600&q=80"
],
summary: "A light trail running shoe for long outings.",
description: "A light trail running shoe with a 5 mm lugged sole, designed for long outings on dry or wet trails. Breathable upper, welded tongue, supported heel.",
badge: "New",
rating: 4.6,
reviewCount: 38,
options: [
{
name: "Color",
values: [
"Midnight blue",
"Sand"
]
},
{
name: "Size",
values: [
"39",
"40"
]
}
],
variants: [
{
id: "0-39",
options: {
Couleur: "Midnight blue",
Taille: "39"
},
available: true,
stock: 12
},
{
id: "0-40",
options: {
Couleur: "Midnight blue",
Taille: "40"
},
available: true,
stock: 3
}
],
facts: [
{
label: "Weight",
value: "9.5 oz (EU size 42)"
},
{
label: "Drop",
value: "6 mm"
}
]
},
trust: [
"Free returns within 30 days",
"Secure payment"
],
actions: {
add: "cart.add",
wishlist: "wishlist.add",
sizeGuide: "size-guide"
},
options: {
wishlistLabel: "Add to favorites",
sizeGuideLabel: "Size guide",
optionWithSizeGuide: "Size"
}
}
</script>
<template>
<StorefrontProductOverviewPosterPanel v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| product* | Product | Datathe product, with its pictures, options and variants |
| breadcrumb | Breadcrumb[] | the path to the product, from the home page; its last item is the product itself, shown as the current page |
| trust | string[] | Wordsa promise the merchant keeps ("Returns within 30 days") |
| actions | Actions | the page actions the block runs, each described below |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Product product · 22 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 |
| images | (string | Image)[] | its pictures: an address, or an address with what that picture shows (its own alt) |
| alt | string | Wordswhat the main picture shows |
| brand | string | Wordsthe brand or maker |
| category | string | Wordsthe product’s category, e.g. "Knitwear" |
| summary | string | Wordsone short line on the product |
| badge | string | Wordsa short tag the merchant set ("New", "Handmade") |
| rating | number | the average of the shop’s own stored reviews |
| reviewCount | number | how many stored reviews the rating averages |
| available | boolean | false: sold out; true or absent: can be bought |
| stock | number | the real stock, when the merchant shows it |
| maxQuantity | number | the most one order may hold of it, as the merchant set it (one per customer, a limited run) |
| options | Option[] | the product’s options and their values, e.g. sizes |
| highlights | Highlight[] | a few key facts the merchant set, shown on the product’s card |
| description | string | Wordsthe product’s presentation, in the merchant’s words |
| facts | Fact[] | the product’s key facts, each a property and its value, e.g. "Material": "Full-grain leather" |
| variants | Variant[] | every combination of options the product comes in, with its own price and stock |
Option product.options[] · 2 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordsthe option’s name, e.g. "Size" |
| values* | string[] | Wordsits values, e.g. "S", "M", "L" |
Highlight product.highlights[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe property ("Material", "Capacity") |
| value* | string | Wordsits value, as the merchant states it ("Washed linen", "50 cl") |
Fact product.facts[] · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Words"Material" |
| value* | string | Words"Full-grain leather" |
Variant product.variants[] · 5 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | the variant’s id, sent with cart.add |
| options* | Record<string, string> | the value of each option for this variant, by option name, e.g. { "Colour": "Navy" } |
| price | number | its own price in cents, when it differs |
| available | boolean | false: the variant is sold out |
| stock | number | the variant’s real stock, when the merchant shows it |
Breadcrumb breadcrumb[] · 4 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe link’s words, e.g. "See the collection" |
| action | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action applies to, passed to the host with it, if any |
| url | string | Designan address outside the app |
Actions actions · 3 props
| Prop | Type | Description |
|---|---|---|
| add* | string | Actionthe action the add-to-cart form posts to |
| wishlist | string | Actiona named action of the page |
| sizeGuide | string | Actiona named action of the page |
Options options · 4 props
| Prop | Type | Description |
|---|---|---|
| wishlistLabel | string | Words"Add to favourites" |
| sizeGuideLabel | string | Words"Size guide" |
| optionWithSizeGuide | string | Wordsthe name of the option the size guide belongs to ("Size") |
| 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
- Subtle motion: one short reveal; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
breadcrumb[],cart.add,actions.wishlist,actions.sizeGuide - Reads
productsfrom your app
A storefront section, for product pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, reka-ui, tailwind-merge.
Built with
The components this block is made of; each one installs on its own too.
More storefront blocks
- Product grid: the catalogue’s standard grid, four columns on a wide screen: every product equal, so a visitor compares quickly.
- Product hotspots markers: a product seen as a whole where details matter (a bag, a watch): numbered markers on one picture, the list beside it.
- Product information sheet drawer: Long materials, ingredients or care copy in a side panel opened from compact rows; the merchant’s own only.
- Product offer panel frequency: a product bought once or on subscription: two selectable cards, the saving as a number, a button that restates the choice.
- Product patina compare: two pictures of the same product, new and worn, split by a handle, with a part-by-part table: durability told by its owner; the merchant’s own only.
- Product profile scale bars: Labelled scales with a precise marker for roast, body or intensity; the merchant’s own only.
- Product Q&A question index: Every question first as a numbered index of links, then each answer open under its number: a long list of questions a shopper scans before reading; the merchant's own questions only.
- Product Q&A section: A heading beside two columns of answers for a full product section; the merchant's own questions only.