Social Proof
Compact trust bars — avatar stacks, star ratings and headline stats.
Preview
@props([
'heading' => 'Trusted by fast-moving teams',
'rating' => '4.9',
'ratingLabel' => 'from 2,000+ reviews',
'avatars' => null,
'stats' => null,
])
@php
$avatars ??= [
['fallback' => 'AM', 'alt' => 'Amara M.'],
['fallback' => 'JK', 'alt' => 'Jonah K.'],
['fallback' => 'SL', 'alt' => 'Sofia L.'],
['fallback' => 'RD', 'alt' => 'Ravi D.'],
['fallback' => 'TN', 'alt' => 'Tariq N.'],
];
$stats ??= [
['value' => '2,000+', 'label' => 'Active teams'],
['value' => '4.9/5', 'label' => 'Average rating'],
['value' => '99.9%', 'label' => 'Uptime'],
];
@endphp
<section {{ $attributes->merge(['class' => 'bg-background py-16 text-foreground sm:py-20']) }}>
<div class="mx-auto flex max-w-3xl flex-col items-center gap-6 px-4 text-center">
{{-- Avatar stack --}}
<x-ui.avatar-group :avatars="array_map(fn ($avatar) => ['src' => $avatar['src'] ?? null, 'name' => __($avatar['alt']), 'initials' => $avatar['fallback'] ?? null], $avatars)" :max="count($avatars)" />
{{-- Star rating --}}
<div class="flex flex-col items-center gap-2 sm:flex-row">
<div class="flex items-center gap-0.5" role="img" aria-label="{{ __(':rating out of 5 stars', ['rating' => $rating]) }}">
@foreach (range(1, 5) as $star)
<svg class="size-5 text-primary" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path d="M10 1.5l2.6 5.27 5.82.85-4.21 4.1.99 5.78L10 14.77l-5.2 2.73.99-5.78-4.21-4.1 5.82-.85L10 1.5z" />
</svg>
@endforeach
</div>
<p class="text-sm text-muted-foreground">
<span class="font-semibold text-foreground">{{ $rating }}</span> {{ __($ratingLabel) }}
</p>
</div>
<h2 class="text-balance text-2xl font-bold tracking-tight sm:text-3xl">{{ __($heading) }}</h2>
{{-- Headline stats --}}
@if (! empty($stats))
<div class="mt-2 grid w-full max-w-xl grid-cols-1 gap-6 sm:grid-cols-3">
@foreach ($stats as $stat)
<x-ui.stat variant="plain" :value="$stat['value']" :label="__($stat['label'])" class="items-center text-center" />
@endforeach
</div>
@endif
</div>
</section>
Installation
php artisan ui:add blocks/social-proof-trust-bar
Registry contract
Install confidence
php artisan ui:add blocks/social-proof-trust-bar
writes only the generated targets below. The CLI validates each file hash before writing and
prompts before replacing local changes unless --force is used.
- Version
- 1.0.6
- License
- open
- Stability
- stable
- Contract
- v1
- Foundation
- ≥ 1.0.0
| Type | Generated target |
|---|---|
| blade | resources/views/blocks/social-proof-trust-bar.blade.php |
Registry dependencies
Package dependencies
composer: jml/brok:^0.2
Use with AI
A brief for your coding agent: what the block is, the install command, how to render it, its props and the rules. Copy it, or open a prompt about this block in an assistant.
# Brok UI block: Social Proof (`social-proof-trust-bar`)
A compact trust bar: an overlapping avatar stack, a five-star rating with review count, headline, and a row of headline stats.
Brok UI is a Laravel Blade registry. `ui:add` copies this block into the app as plain Blade the app owns; it composes installed `<brok:*>` primitives and semantic design tokens.
## Install
```bash
php artisan ui:add blocks/social-proof-trust-bar
```
## Render it
```blade
<x-blocks.social-proof-trust-bar />
```
## Props
- `heading` (string, default `Trusted by fast-moving teams`) — Section heading.
- `rating` (string, default `4.9`) — Aggregate star rating value.
- `rating-label` (string, default `from 2,000+ reviews`) — Text shown beside the rating, typically a review count.
- `avatars` (mixed|null, default `null`) — Avatar stack entries with fallback initials and alt text; null falls back to sample data.
- `stats` (mixed|null, default `null`) — Headline stat pairs; null falls back to sample data.
## Use when
- Adding a compact trust bar with an avatar stack, star rating and headline stats near a hero or call to action.
- Needing lightweight social proof rather than full testimonial quotes.
## Avoid when
- Needing full customer quotes with names and roles; use testimonials-split instead.
## Rules
- Render the installed block with `<x-blocks.social-proof-trust-bar />` and pass data through its props; edit the copied file only for structural changes.
- Keep the semantic design tokens (`bg-background`, `text-muted-foreground`); never swap in raw colour utilities.
- Keep the `data-slot` attributes and the logical (start/end) spacing so the markup still mirrors under `dir="rtl"`.
## Links
- Docs: https://brokui.dev/blocks/social-proof-trust-bar
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/social-proof-trust-bar.json
Working in Claude Code, Cursor or Codex? Give the agent the whole registry through the MCP server or the Brok UI skill.
Guidance
Use when
- Adding a compact trust bar with an avatar stack, star rating and headline stats near a hero or call to action.
- Needing lightweight social proof rather than full testimonial quotes.
Avoid when
- Needing full customer quotes with names and roles; use testimonials-split instead.
Anti-patterns
- Do not replace semantic props with conflicting utility classes.
- Do not remove labels, focus styles, or state attributes.
Usage
Render the block as a component, passing data where useful:
<x-blocks.social-proof-trust-bar />
Built from primitives
This block composes installed <brok:*> primitives and semantic design
tokens only — it does not reimplement any primitive. Re-theme it (light, dark, admin, customer) by
editing CSS variables; flip the preview to RTL to confirm it mirrors.
Source
The exact, editable file ui:add writes
into your app. The preview above renders this same source — there are no preview-only blocks.
@props([
'heading' => 'Trusted by fast-moving teams',
'rating' => '4.9',
'ratingLabel' => 'from 2,000+ reviews',
'avatars' => null,
'stats' => null,
])
@php
$avatars ??= [
['fallback' => 'AM', 'alt' => 'Amara M.'],
['fallback' => 'JK', 'alt' => 'Jonah K.'],
['fallback' => 'SL', 'alt' => 'Sofia L.'],
['fallback' => 'RD', 'alt' => 'Ravi D.'],
['fallback' => 'TN', 'alt' => 'Tariq N.'],
];
$stats ??= [
['value' => '2,000+', 'label' => 'Active teams'],
['value' => '4.9/5', 'label' => 'Average rating'],
['value' => '99.9%', 'label' => 'Uptime'],
];
@endphp
<section {{ $attributes->merge(['class' => 'bg-background py-16 text-foreground sm:py-20']) }}>
<div class="mx-auto flex max-w-3xl flex-col items-center gap-6 px-4 text-center">
{{-- Avatar stack --}}
<x-ui.avatar-group :avatars="array_map(fn ($avatar) => ['src' => $avatar['src'] ?? null, 'name' => __($avatar['alt']), 'initials' => $avatar['fallback'] ?? null], $avatars)" :max="count($avatars)" />
{{-- Star rating --}}
<div class="flex flex-col items-center gap-2 sm:flex-row">
<div class="flex items-center gap-0.5" role="img" aria-label="{{ __(':rating out of 5 stars', ['rating' => $rating]) }}">
@foreach (range(1, 5) as $star)
<svg class="size-5 text-primary" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path d="M10 1.5l2.6 5.27 5.82.85-4.21 4.1.99 5.78L10 14.77l-5.2 2.73.99-5.78-4.21-4.1 5.82-.85L10 1.5z" />
</svg>
@endforeach
</div>
<p class="text-sm text-muted-foreground">
<span class="font-semibold text-foreground">{{ $rating }}</span> {{ __($ratingLabel) }}
</p>
</div>
<h2 class="text-balance text-2xl font-bold tracking-tight sm:text-3xl">{{ __($heading) }}</h2>
{{-- Headline stats --}}
@if (! empty($stats))
<div class="mt-2 grid w-full max-w-xl grid-cols-1 gap-6 sm:grid-cols-3">
@foreach ($stats as $stat)
<x-ui.stat variant="plain" :value="$stat['value']" :label="__($stat['label'])" class="items-center text-center" />
@endforeach
</div>
@endif
</div>
</section>
Ownership & lifecycle
Owner, release state, review evidence and adoption for this item.
- Owner
- Platform UI (@JoshJML)
- Current version
-
1.0.6 - Status
- Stable
- License
-
open - Deprecation
- Not deprecated
- Contract
-
v1 - Foundation
-
≥ 1.0.0