Criteria reviews answers aside — Storefront block
Prostorefront-criteria-reviews-answers-aside · for product pages
Criteria reviews answers aside
Each review a two-column row, the reviewer and their scale answers on the left, the words and photos on the right, the aggregate scales in a header band: clothes, shoes and gear where fit and comfort decide; the merchant’s own stored reviews 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/storefront-criteria-reviews-answers-asideUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontCriteriaReviewsAnswersAside from '@/components/trame/blocks/storefront/storefront-criteria-reviews-answers-aside.vue'
const props = {
title: "What the people who wear it say",
summary: {
average: 4.4,
count: 86,
recommendShare: 0.91,
scales: [
{
label: "Fit",
position: 0.48,
lowLabel: "Runs small",
highLabel: "Runs large"
},
{
label: "Comfort",
position: 0.66,
lowLabel: "Stiff",
highLabel: "Very supple"
}
]
},
reviews: [
{
id: "r-01",
author: "Julien M.",
rating: 5,
date: "October 12, 2026",
verified: true,
recommends: true,
title: "Dry after two hours in a downpour",
text: "Wore it a whole weekend by the lake, in drizzle and then real rain: nothing got through, not even at the shoulder seams. The hood stays put in the wind.",
images: [
"https://images.unsplash.com/photo-1694561418303-16393986b86d?w=600&q=80"
],
answers: [
{
label: "Fit",
position: 0.5,
lowLabel: "Runs small",
highLabel: "Runs large"
},
{
label: "Comfort",
position: 0.7,
lowLabel: "Stiff",
highLabel: "Very supple"
}
]
},
{
id: "r-02",
author: "Claire D.",
rating: 4,
date: "October 3, 2026",
verified: true,
recommends: true,
title: "Well cut, a little long in the sleeves",
text: "I usually wear a M and took a M: the shoulders are perfect, the sleeves run a little past the wrist. The midnight blue is even nicer in person.",
images: [
"https://images.unsplash.com/photo-1538516089546-40b08c9c9866?w=600&q=80"
],
answers: [
{
label: "Fit",
position: 0.65,
lowLabel: "Runs small",
highLabel: "Runs large"
},
{
label: "Comfort",
position: 0.6,
lowLabel: "Stiff",
highLabel: "Very supple"
}
],
reply: "Thank you, Claire. The sleeves are long on purpose, to cover your wrists on a bike; the size S pattern is three-quarters of an inch shorter."
}
],
filters: [
{
label: "Fit",
key: "topic:taille",
count: 24
},
{
label: "Rain",
key: "topic:pluie",
count: 31,
active: true
}
],
sorts: [
{
label: "Most recent",
key: "recent",
active: true
},
{
label: "Most helpful",
key: "helpful"
}
],
filterAction: "reviews.filter",
sortAction: "reviews.sort",
pageAction: "reviews.page",
total: 86,
currentPage: 1,
perPage: 6
}
</script>
<template>
<StorefrontCriteriaReviewsAnswersAside v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe section title ("Customer reviews") |
| summary | Summary | Datathe aggregate, from the review store: never computed by the agent |
| reviews* | Review[] | Datathe reviews on this page |
| filters | Filter[] | topic or star chips, with their counts |
| sorts | Sort[] | the orders the reviews can be sorted in |
| filterAction | string | Actionthe page action when a filter is clicked; it receives the filter key |
| sortAction | string | Actionthe page action when a sort is chosen; it receives the sort key |
| pageAction | string | Actionthe page action for pagination; it receives the page number |
| total | number | Datathe number of reviews across all pages |
| currentPage | number | Datathe current page |
| perPage | number | Datahow many reviews per page |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Summary summary · 4 props
| Prop | Type | Description |
|---|---|---|
| average* | number | the average rating, 1 to 5 |
| count* | number | how many, as the host counted them |
| recommendShare | number | the share of reviewers who said they recommend it |
| scales | Scale[] | the average answer on each scale |
Scale summary.scales[] · 4 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe question ("Size", "Comfort") |
| position* | number | where the answer sits between the two ends: 0 the low end, 1 the high end |
| lowLabel* | string | Wordsthe low end ("Runs small") |
| highLabel* | string | Wordsthe high end ("Runs large") |
Review reviews[] · 11 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe record’s id in the tool that answers it |
| author* | string | Wordswho wrote the review, as the shop shows it |
| rating* | number | the stars given, 1 to 5 |
| title | string | Wordsthe review’s title |
| text* | string | Wordsthe review, in the customer’s words |
| date | string | Wordswhen it was written, as the shop writes it |
| verified | boolean | bought in the shop, as the shop recorded it |
| images | string[] | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| reply | string | Wordsthe merchant’s reply |
| answers | Answer[] | the reviewer’s own answers, as stored |
| recommends | boolean | whether the reviewer said they recommend it |
Answer reviews[].answers[] · 4 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe question ("Size", "Comfort") |
| position* | number | where the answer sits between the two ends: 0 the low end, 1 the high end |
| lowLabel* | string | Wordsthe low end ("Runs small") |
| highLabel* | string | Wordsthe high end ("Runs large") |
Filter filters[] · 4 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the chip says ("Size", "With photos") |
| key* | string | Wordsthe key the host recognises |
| active | boolean | true: the one selected now |
| count | number | how many, as the host counted them |
Sort sorts[] · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat the chip says ("Size", "With photos") |
| key* | string | Wordsthe key the host recognises |
| active | boolean | true: the one selected now |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| showVerified | boolean | show the verified purchase mark (on 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
- Subtle motion: one short reveal; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
filterAction,sortAction,pageAction - Reads
reviewsfrom 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
- Collection story chapters with rail: a seasonal or campaign edit told in full-width picture chapters, each followed by its three or four products.
- Condition grades grade scale: a grading of used or restored goods: each grade in plain words with its price band.
- Configurable purchase stacked: a modular product (a sofa, a bike, a shelf): each step chooses a part, and the price adds the choices to the product’s price.
- Contact sheet: up to a dozen small numbered frames, the kept ones outlined, with a count under: the story of a shoot, honestly told.
- Corporate gifting: companies order in numbers: the offer and its terms, a contact button instead of a form.
- Cross sell badged: the merchant’s badge on the picture and the price before the reduction: complements that are on offer.
- Cross sell feature line: one benefit under each name: complements whose use is not obvious from the picture.
- Cross sell grid4: small cards in a row, a rail past four: products to add under a product page.