Criteria reviews answers aside — Storefront block

Pro

storefront-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-aside

Usage

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.

PropTypeDescription
title*stringWordsthe section title ("Customer reviews")
summarySummaryDatathe aggregate, from the review store: never computed by the agent
reviews*Review[]Datathe reviews on this page
filtersFilter[]topic or star chips, with their counts
sortsSort[]the orders the reviews can be sorted in
filterActionstringActionthe page action when a filter is clicked; it receives the filter key
sortActionstringActionthe page action when a sort is chosen; it receives the sort key
pageActionstringActionthe page action for pagination; it receives the page number
totalnumberDatathe number of reviews across all pages
currentPagenumberDatathe current page
perPagenumberDatahow many reviews per page
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Summary summary · 4 props
PropTypeDescription
average*numberthe average rating, 1 to 5
count*numberhow many, as the host counted them
recommendSharenumberthe share of reviewers who said they recommend it
scalesScale[]the average answer on each scale
Scale summary.scales[] · 4 props
PropTypeDescription
label*stringWordsthe question ("Size", "Comfort")
position*numberwhere the answer sits between the two ends: 0 the low end, 1 the high end
lowLabel*stringWordsthe low end ("Runs small")
highLabel*stringWordsthe high end ("Runs large")
Review reviews[] · 11 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
author*stringWordswho wrote the review, as the shop shows it
rating*numberthe stars given, 1 to 5
titlestringWordsthe review’s title
text*stringWordsthe review, in the customer’s words
datestringWordswhen it was written, as the shop writes it
verifiedbooleanbought in the shop, as the shop recorded it
imagesstring[]Picturea picture: a root-relative path (/media/…) or an absolute URL
replystringWordsthe merchant’s reply
answersAnswer[]the reviewer’s own answers, as stored
recommendsbooleanwhether the reviewer said they recommend it
Answer reviews[].answers[] · 4 props
PropTypeDescription
label*stringWordsthe question ("Size", "Comfort")
position*numberwhere the answer sits between the two ends: 0 the low end, 1 the high end
lowLabel*stringWordsthe low end ("Runs small")
highLabel*stringWordsthe high end ("Runs large")
Filter filters[] · 4 props
PropTypeDescription
label*stringWordswhat the chip says ("Size", "With photos")
key*stringWordsthe key the host recognises
activebooleantrue: the one selected now
countnumberhow many, as the host counted them
Sort sorts[] · 3 props
PropTypeDescription
label*stringWordswhat the chip says ("Size", "With photos")
key*stringWordsthe key the host recognises
activebooleantrue: the one selected now
Options options · 2 props
PropTypeDescription
showVerifiedbooleanshow the verified purchase mark (on by default)
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa 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).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
asseta picture’s address as your app serves it
Linkyour router’s link component
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour 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:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo 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 reviews from 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.

All 409 storefront blocks