Social proof bar inline — Testimonials block
Protestimonials-social-proof-bar-inline · for home, landing pages
Social proof bar inline
Avatars, stars and the count on one line, next to a hero or an action: the quietest signal; 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/testimonials-social-proof-bar-inlineUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import TestimonialsSocialProofBarInline from '@/components/trame/blocks/testimonials/testimonials-social-proof-bar-inline.vue'
const props = {
rating: 4.8,
count: 312,
label: "verified customer reviews",
avatars: [
{
src: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=1600&q=80"
},
{
src: "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=1600&q=80"
}
],
href: "reviews"
}
</script>
<template>
<TestimonialsSocialProofBarInline 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") |
| avatars | Avatar[] | real customers’ photos, shared with their permission |
| 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 |
Avatar avatars[] · 2 props
| Prop | Type | Description |
|---|---|---|
| src* | string | Picturea real customer’s photo, shared with their permission |
| name | string | Wordstheir name, for the picture’s description |
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 |
| 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
- No motion; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
href - Reads
reviewsfrom your app
A testimonials section, for home, landing pages; it uses @lucide/vue, @vueuse/core, clsx, tailwind-merge.
More testimonials blocks
- Masonry: many short quotes without hierarchy in balanced columns, folded to the first few on a phone: a shop with a lot of reviews.
- People bar portraits: the merchant can show who joined or who vouches: their portraits beside the message, in a bar.
- Portraits: two to six customers led by a tall portrait with the quote below: a brand of people and craft, with real photos.
- Pull quote: a single sentence and two figures, centered and bare: a closing proof before an action.
- Rotator: a few longer quotes told one at a time with their authors’ photos stacked beside: quotes that need room, and a visitor who reads.
- Spotlight: one customer told large with their portrait and up to three of their own figures: a landing with one strong story.
- Strip with figures: one quote on the left and three result figures as cards on the right: a customer whose results are the argument.
- Video feature: one customer’s film large with their words beside it and the others as thumbnails to pick: a story worth watching, with a few more behind it.