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' => 'Powering teams that ship faster',
'lead' => 'From early-stage startups to enterprise engineering organisations, teams that adopt our platform see measurable improvements in every dimension that matters.',
'ctaLabel' => 'View the report',
'ctaHref' => '#',
'linkLabel' => 'Learn more',
'linkHref' => '#',
'stats' => null,
])
@php
$stats ??= [
['value' => '3.4×', 'label' => 'Faster release cycles on average', 'up' => true, 'trend' => '18%'],
['value' => '99.98%', 'label' => 'Uptime across all production regions', 'up' => true, 'trend' => '0.6%'],
['value' => '62%', 'label' => 'Reduction in critical incident rate', 'up' => false, 'trend' => '12%'],
['value' => '41K+', 'label' => 'Developers trust the platform daily', 'up' => true, 'trend' => '24%'],
];
@endphp
<x-ui.section space="xl" {{ $attributes }}>
<x-ui.container gutter="sm">
<div class="flex flex-col gap-12 lg:flex-row lg:items-center lg:gap-16">
<div class="flex flex-col gap-6 lg:w-1/2">
@if ($eyebrow)
<p class="text-sm font-semibold uppercase tracking-widest text-primary">{{ __($eyebrow) }}</p>
@endif
<h2 class="text-3xl font-bold tracking-tight sm:text-4xl">{{ __($heading) }}</h2>
<p class="text-base leading-relaxed text-muted-foreground sm:text-lg">{{ __($lead) }}</p>
<div class="flex flex-wrap items-center gap-4">
<x-ui.button :href="$ctaHref" variant="default">{{ __($ctaLabel) }}</x-ui.button>
<x-ui.button :href="$linkHref" variant="ghost">
{{ __($linkLabel) }}
<svg class="ms-2 size-4 shrink-0 rtl:-scale-x-100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M5 12h14M13 6l6 6-6 6" />
</svg>
</x-ui.button>
</div>
</div>
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:w-1/2">
@foreach ($stats as $stat)
<x-ui.stat
size="lg"
:value="$stat['value']"
:label="__($stat['label'])"
:delta="($stat['up'] ? '+' : '-').ltrim((string) $stat['trend'], '+-')"
:tone="$stat['up'] ? 'positive' : 'neutral'"
/>
@endforeach
</div>
</div>
</x-ui.container>
</x-ui.section>
Installation
php artisan ui:add blocks/stats-split
Registry contract
Install confidence
php artisan ui:add blocks/stats-split
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.5
- License
- open
- Stability
- stable
- Contract
- v1
- Foundation
- ≥ 1.0.0
| Type | Generated target |
|---|---|
| blade | resources/views/blocks/stats-split.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 02 (`stats-split`)
A two-column stats section pairing a heading, lead and call-to-action with a 2x2 grid of metric cards that each show a value, label and up/down trend indicator.
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-split
```
## Render it
```blade
<x-blocks.stats-split />
```
## Props
- `eyebrow` (string, default `By the numbers`) — Small label shown above the heading.
- `heading` (string, default `Powering teams that ship faster`) — Section heading.
- `lead` (string, default `From early-stage startups to enterprise engineering organisations, teams that adopt our platform see measurable improvements in every dimension that matters.`) — Supporting lead paragraph under the heading.
- `cta-label` (string, default `View the report`) — Call-to-action button label.
- `cta-href` (string, default `#`) — Call-to-action destination.
- `link-label` (string, default `Learn more`) — Secondary ghost-link label.
- `link-href` (string, default `#`) — Secondary ghost-link destination.
- `stats` (mixed|null, default `null`) — Metric cards with a value, label, up/down flag and trend percentage; null falls back to sample data.
## Use when
- Pairing a heading, lead copy and call to action with a 2x2 grid of metric cards that show trend direction.
- Wanting stats to sit beside a persuasive pitch rather than stand alone.
## Avoid when
- Wanting metrics as the sole content of the section; use stats-grid instead.
## Rules
- Render the installed block with `<x-blocks.stats-split />` 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-split
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/stats-split.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
- Pairing a heading, lead copy and call to action with a 2x2 grid of metric cards that show trend direction.
- Wanting stats to sit beside a persuasive pitch rather than stand alone.
Avoid when
- Wanting metrics as the sole content of the section; 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-split />
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' => 'Powering teams that ship faster',
'lead' => 'From early-stage startups to enterprise engineering organisations, teams that adopt our platform see measurable improvements in every dimension that matters.',
'ctaLabel' => 'View the report',
'ctaHref' => '#',
'linkLabel' => 'Learn more',
'linkHref' => '#',
'stats' => null,
])
@php
$stats ??= [
['value' => '3.4×', 'label' => 'Faster release cycles on average', 'up' => true, 'trend' => '18%'],
['value' => '99.98%', 'label' => 'Uptime across all production regions', 'up' => true, 'trend' => '0.6%'],
['value' => '62%', 'label' => 'Reduction in critical incident rate', 'up' => false, 'trend' => '12%'],
['value' => '41K+', 'label' => 'Developers trust the platform daily', 'up' => true, 'trend' => '24%'],
];
@endphp
<x-ui.section space="xl" {{ $attributes }}>
<x-ui.container gutter="sm">
<div class="flex flex-col gap-12 lg:flex-row lg:items-center lg:gap-16">
<div class="flex flex-col gap-6 lg:w-1/2">
@if ($eyebrow)
<p class="text-sm font-semibold uppercase tracking-widest text-primary">{{ __($eyebrow) }}</p>
@endif
<h2 class="text-3xl font-bold tracking-tight sm:text-4xl">{{ __($heading) }}</h2>
<p class="text-base leading-relaxed text-muted-foreground sm:text-lg">{{ __($lead) }}</p>
<div class="flex flex-wrap items-center gap-4">
<x-ui.button :href="$ctaHref" variant="default">{{ __($ctaLabel) }}</x-ui.button>
<x-ui.button :href="$linkHref" variant="ghost">
{{ __($linkLabel) }}
<svg class="ms-2 size-4 shrink-0 rtl:-scale-x-100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M5 12h14M13 6l6 6-6 6" />
</svg>
</x-ui.button>
</div>
</div>
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:w-1/2">
@foreach ($stats as $stat)
<x-ui.stat
size="lg"
:value="$stat['value']"
:label="__($stat['label'])"
:delta="($stat['up'] ? '+' : '-').ltrim((string) $stat['trend'], '+-')"
:tone="$stat['up'] ? 'positive' : 'neutral'"
/>
@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.5 - Status
- Stable
- License
-
open - Deprecation
- Not deprecated
- Contract
-
v1 - Foundation
-
≥ 1.0.0