Review signal pill — Storefront block
Prostorefront-review-signal-pill · for home, landing pages
Review signal pill
A small pill above a heading carrying the rating and the count: a signal that introduces a title; the merchant’s own 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-review-signal-pillUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontReviewSignalPill from '@/components/trame/blocks/storefront/storefront-review-signal-pill.vue'
const props = {
rating: 4.8,
count: 312,
label: "verified customer reviews",
href: "reviews"
}
</script>
<template>
<StorefrontReviewSignalPill v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| rating | number | Datathe average from the stored reviews, or the number a named third party gives: never typed to flatter |
| count | number | Datahow many reviews that average rests on |
| label | string | Wordswhat the figures are ("verified customer reviews"): the words after the count |
| source | string | Wordswhere the rating comes from, when it is not the shop itself ("Verified Reviews") |
| figures | Figure[] | stat-trio: up to two more figures beside the rating and the count |
| href | string | Actionwhere the reviews are read |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Figure figures[] · 2 props
| Prop | Type | Description |
|---|---|---|
| value* | string | Wordsa second or third figure as the merchant writes it ("12,400") |
| label* | string | Wordswhat it counts, with its period ("orders since 2019") |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| 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 |
| 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
- No motion; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
href - Reads
reviewsfrom your app
A storefront section, for home, landing pages; it uses @lucide/vue.
More storefront blocks
- Review list two column: the summary sticky on the left, reviews scrolling on the right: a wide screen where the summary stays visible.
- Review list: a single-column list of reviews with a summary header: the standard review page.
- Review panel rail: the rating, the photo strip and the filter chips gathered in a narrow rail beside compact review rows: a panel that sits next to the gallery, or floats as a dialog.
- Review panel wall: the score, its bars and the customer photos in one wide band, the filters and sorts in a toolbar, then the reviews as cards in balanced columns: a full-width reviews section under the product, with many reviews to browse; the customers’ own reviews only.
- Review snapshot distribution scales: clothes, shoes and gear where fit and comfort decide the purchase: the bars plus dot-on-track scales from reviewers.
- Review snapshot distribution: a product page that wants the average and the five star bars at a glance, with a link to every review.
- Reviews summary bars: a product page: the average, the count and one bar per star beside the list of reviews; the merchant’s own only.
- Reviews summary cards grid: a home or a landing: many short reviews as cards, each with its stars, author and product; the merchant’s own only.