Stats
Metric sections — a centered grid of headline numbers and a split layout pairing copy with trend cards.
Preview
@props([
'eyebrow' => 'By the numbers',
'heading' => 'Results that speak for themselves',
'lead' => 'We obsess over craft and delivery — here is what that looks like in practice.',
'stats' => null,
])
@php
$stats ??= [
['value' => '99%', 'label' => 'Customer satisfaction'],
['value' => '4.8×', 'label' => 'Average ROI'],
['value' => '12M+', 'label' => 'Requests per day'],
['value' => '< 1s', 'label' => 'Median response time'],
];
@endphp
<x-ui.section space="xl" {{ $attributes }}>
<x-ui.container gutter="sm">
<div class="rounded-lg bg-primary px-6 py-12 text-center sm:px-12">
<div class="mb-4 flex justify-center">
<x-ui.badge class="border-transparent bg-primary-foreground text-primary">{{ __($eyebrow) }}</x-ui.badge>
</div>
<h2 class="text-3xl font-bold tracking-tight text-primary-foreground sm:text-4xl">{{ __($heading) }}</h2>
<p class="mx-auto mt-4 max-w-2xl text-base leading-7 text-primary-foreground">{{ __($lead) }}</p>
<div class="mt-10 border-t border-primary-foreground/20"></div>
<div class="mt-10 grid grid-cols-2 gap-y-8 lg:grid-cols-4">
@foreach ($stats as $index => $stat)
<x-ui.stat
variant="plain"
size="lg"
:value="$stat['value']"
:label="__($stat['label'])"
@class([
'items-center text-center text-primary-foreground [&_[data-slot=stat-label]]:text-primary-foreground',
'lg:border-s lg:border-primary-foreground/20 lg:ps-6' => $index > 0,
])
/>
@endforeach
</div>
</div>
</x-ui.container>
</x-ui.section>
Installation
php artisan ui:add blocks/stats-band
Registry contract
Install confidence
php artisan ui:add blocks/stats-band
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/stats-band.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: Stats 03 (`stats-band`)
A bold stats band on a filled primary panel — an eyebrow, heading and lead above a four-up description list with dividers.
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/stats-band
```
## Render it
```blade
<x-blocks.stats-band />
```
## Props
- `eyebrow` (string, default `By the numbers`) — Small label shown above the heading.
- `heading` (string, default `Results that speak for themselves`) — Section heading.
- `lead` (string, default `We obsess over craft and delivery — here is what that looks like in practice.`) — Supporting lead paragraph under the heading.
- `stats` (mixed|null, default `null`) — Metric pairs ({value, label}); null falls back to sample data.
## Use when
- Displaying a bold stats band on a filled primary-colour panel for high visual emphasis.
- Wanting the metrics to read as a standout brand moment rather than a neutral section.
## Avoid when
- Wanting a neutral-background stats grid; use stats-grid instead.
## Rules
- Render the installed block with `<x-blocks.stats-band />` 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/stats-band
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/stats-band.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
- Displaying a bold stats band on a filled primary-colour panel for high visual emphasis.
- Wanting the metrics to read as a standout brand moment rather than a neutral section.
Avoid when
- Wanting a neutral-background stats grid; use stats-grid 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.stats-band />
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([
'eyebrow' => 'By the numbers',
'heading' => 'Results that speak for themselves',
'lead' => 'We obsess over craft and delivery — here is what that looks like in practice.',
'stats' => null,
])
@php
$stats ??= [
['value' => '99%', 'label' => 'Customer satisfaction'],
['value' => '4.8×', 'label' => 'Average ROI'],
['value' => '12M+', 'label' => 'Requests per day'],
['value' => '< 1s', 'label' => 'Median response time'],
];
@endphp
<x-ui.section space="xl" {{ $attributes }}>
<x-ui.container gutter="sm">
<div class="rounded-lg bg-primary px-6 py-12 text-center sm:px-12">
<div class="mb-4 flex justify-center">
<x-ui.badge class="border-transparent bg-primary-foreground text-primary">{{ __($eyebrow) }}</x-ui.badge>
</div>
<h2 class="text-3xl font-bold tracking-tight text-primary-foreground sm:text-4xl">{{ __($heading) }}</h2>
<p class="mx-auto mt-4 max-w-2xl text-base leading-7 text-primary-foreground">{{ __($lead) }}</p>
<div class="mt-10 border-t border-primary-foreground/20"></div>
<div class="mt-10 grid grid-cols-2 gap-y-8 lg:grid-cols-4">
@foreach ($stats as $index => $stat)
<x-ui.stat
variant="plain"
size="lg"
:value="$stat['value']"
:label="__($stat['label'])"
@class([
'items-center text-center text-primary-foreground [&_[data-slot=stat-label]]:text-primary-foreground',
'lg:border-s lg:border-primary-foreground/20 lg:ps-6' => $index > 0,
])
/>
@endforeach
</div>
</div>
</x-ui.container>
</x-ui.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