Product test results scored list — Storefront block

Pro

storefront-product-test-results-scored-list · for product pages

Product test results scored list

A product the merchant tested (weather, wear, battery): scenarios with a five-dot score and the result in words

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-test-results-scored-list

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StorefrontProductTestResultsScoredList from '@/components/trame/blocks/storefront/storefront-product-test-results-scored-list.vue'

const props = {
title: "Put to the test",
intro: "Four tests our workshop ran on three samples.",
results: [
{
scenario: "Light rain, 1 hour",
score: 5,
text: "Dry inside, no trace of moisture at the seams."
},
{
scenario: "Driving rain, 2 hours",
score: 4,
text: "A few drops where the flap meets the bag; the contents stay dry."
}
],
summary: "Rainproof, less resistant to repeated abrasion."
}
</script>

<template>
<StorefrontProductTestResultsScoredList v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
title*stringWordsthe block’s title ("Features")
introstringWordsone sentence on what the details cover
results*Result[]the tests the product went through, each with its result
summarystringWordsan honest line on the results or the changes, as the merchant wrote it
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Result results[] · 3 props
PropTypeDescription
scenario*stringWordsthe test ("Driving rain, 2 hours")
score*numberthe merchant’s own score out of five
textstringWordswhat happened
Options options · 1 props
PropTypeDescription
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
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

A storefront section, for product pages.

More storefront blocks

  • Product spotlight: one product large with its facts, the others as thumbnails that swap it: a hero product among a range; the merchant’s own products and figures only.
  • Product story chapters: the buy card first, beside one picture, then the story as numbered chapters with picture and words alternating sides: a product bought on its specification first, whose story rewards those who scroll on.
  • Product story immersive: a full-width hero picture with the story in tabs and the buy panel raised below it: a product with one strong photograph and more to tell.
  • Product story sticky story: pictures and short paragraphs scroll beside a buy card that stays in view: a craft or premium product with something to tell.
  • Product transformation slider: a product that transforms something (a stain, a repair, a finish): the list beside a before-after slider.
  • Product trust facts inline: one dotted line under the button: when the shop has one or two short facts and the buy box is already full.
  • Product trust facts list: icon lines under the buy button, one fact per line: the usual place for delivery, returns and guarantee.
  • Product trust facts tiles: a 2 by 2 grid of small cards with a big figure and a caption: when the facts are numbers worth reading at a glance.

All 409 storefront blocks