Hero
Marketing hero sections: centred, split, search, form, video, stats, screenshot and more; the centred hero takes a switchable backdrop.
Preview
@props([
'eyebrow' => 'Trusted by teams everywhere',
'heading' => 'Ship faster with a team that trusts you',
'lead' => 'The all-in-one platform that gives your team the tools, visibility, and confidence to build and deploy without friction.',
'primaryLabel' => 'Get started for free',
'primaryHref' => '#',
'outlineLabel' => 'See how it works',
'outlineHref' => '#',
'stats' => null,
])
@php
$stats ??= [
['number' => '10k+', 'label' => 'Teams worldwide'],
['number' => '99.9%', 'label' => 'Uptime SLA'],
['number' => '4.9/5', 'label' => 'Average rating'],
['number' => '150+', 'label' => 'Integrations'],
];
@endphp
<section data-slot="hero-stats" {{ $attributes->merge(['class' => 'mx-auto w-full max-w-6xl px-4 py-16 text-foreground sm:py-24 lg:py-32']) }}>
<div class="flex flex-col items-center gap-6 text-center">
<x-ui.badge variant="secondary" size="sm">{{ __($eyebrow) }}</x-ui.badge>
<h1 class="max-w-3xl text-4xl font-bold tracking-tight text-foreground sm:text-5xl lg:text-6xl">{{ __($heading) }}</h1>
<p class="max-w-2xl text-sm leading-relaxed text-muted-foreground">{{ __($lead) }}</p>
<div class="mt-2 flex flex-col items-center gap-4 sm:flex-row">
<x-ui.button :href="$primaryHref" variant="default" :with-arrow="true">{{ __($primaryLabel) }}</x-ui.button>
<x-ui.button :href="$outlineHref" variant="outline">
<x-slot:icon>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="size-4" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<polygon points="10 8 16 12 10 16 10 8" fill="currentColor" stroke="none" />
</svg>
</x-slot:icon>
{{ __($outlineLabel) }}
</x-ui.button>
</div>
</div>
<div class="mt-12 border-t border-border pt-10">
<dl class="grid grid-cols-2 gap-x-6 gap-y-10 lg:grid-cols-4">
@foreach ($stats as $index => $stat)
<div class="flex flex-col items-center gap-2 text-center {{ $index >= 1 ? 'lg:border-s lg:border-border lg:ps-6' : '' }}">
<dt class="text-3xl font-bold tracking-tight text-foreground sm:text-4xl">{{ $stat['number'] }}</dt>
<dd class="text-sm font-medium text-muted-foreground">{{ __($stat['label']) }}</dd>
</div>
@endforeach
</dl>
</div>
</section>
Installation
php artisan ui:add blocks/hero-stats
Registry contract
Install confidence
php artisan ui:add blocks/hero-stats
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.3
- License
- open
- Stability
- stable
- Contract
- v1
- Foundation
- ≥ 1.0.0
| Type | Generated target |
|---|---|
| blade | resources/views/blocks/hero-stats.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: Hero Stats (`hero-stats`)
A centered hero with an integrated trust-stats band below the call-to-action buttons, rendered as a four-up description list with vertical dividers on desktop.
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/hero-stats
```
## Render it
```blade
<x-blocks.hero-stats />
```
## Props
- `eyebrow` (string, default `Trusted by teams everywhere`) — Small label shown above the heading inside a badge.
- `heading` (string, default `Ship faster with a team that trusts you`) — Primary headline.
- `lead` (string, default `The all-in-one platform that gives your team the tools, visibility, and confidence to build and deploy without friction.`) — Supporting copy under the heading.
- `primary-label` (string, default `Get started for free`) — Primary button label.
- `primary-href` (string, default `#`) — Primary button destination.
- `outline-label` (string, default `See how it works`) — Outline secondary button label.
- `outline-href` (string, default `#`) — Outline secondary button destination.
- `stats` (mixed|null, default `null`) — Rows of {number, label}; null falls back to a default 4-item sample.
## Use when
- Opening a marketing page that wants a compact eyebrow, heading, lead and dual CTA followed immediately by a four-up band of trust metrics.
- Wanting the stats presented as a dividered description list directly under the hero copy rather than as a separate section further down the page.
## Avoid when
- Needing an optional stats row alongside a switchable decorative backdrop (aurora, beams, gradient, etc); use hero-centered instead, which renders a similar stats row with a choice of backdrops.
## Rules
- Render the installed block with `<x-blocks.hero-stats />` 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/hero-stats
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/hero-stats.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
- Opening a marketing page that wants a compact eyebrow, heading, lead and dual CTA followed immediately by a four-up band of trust metrics.
- Wanting the stats presented as a dividered description list directly under the hero copy rather than as a separate section further down the page.
Avoid when
- Needing an optional stats row alongside a switchable decorative backdrop (aurora, beams, gradient, etc); use hero-centered instead, which renders a similar stats row with a choice of backdrops.
Anti-patterns
- Do not replace semantic props with conflicting utility classes.
- Do not remove labels, focus styles, or state attributes.
- Anatomy
Usage
Render the block as a component, passing data where useful:
<x-blocks.hero-stats />
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' => 'Trusted by teams everywhere',
'heading' => 'Ship faster with a team that trusts you',
'lead' => 'The all-in-one platform that gives your team the tools, visibility, and confidence to build and deploy without friction.',
'primaryLabel' => 'Get started for free',
'primaryHref' => '#',
'outlineLabel' => 'See how it works',
'outlineHref' => '#',
'stats' => null,
])
@php
$stats ??= [
['number' => '10k+', 'label' => 'Teams worldwide'],
['number' => '99.9%', 'label' => 'Uptime SLA'],
['number' => '4.9/5', 'label' => 'Average rating'],
['number' => '150+', 'label' => 'Integrations'],
];
@endphp
<section data-slot="hero-stats" {{ $attributes->merge(['class' => 'mx-auto w-full max-w-6xl px-4 py-16 text-foreground sm:py-24 lg:py-32']) }}>
<div class="flex flex-col items-center gap-6 text-center">
<x-ui.badge variant="secondary" size="sm">{{ __($eyebrow) }}</x-ui.badge>
<h1 class="max-w-3xl text-4xl font-bold tracking-tight text-foreground sm:text-5xl lg:text-6xl">{{ __($heading) }}</h1>
<p class="max-w-2xl text-sm leading-relaxed text-muted-foreground">{{ __($lead) }}</p>
<div class="mt-2 flex flex-col items-center gap-4 sm:flex-row">
<x-ui.button :href="$primaryHref" variant="default" :with-arrow="true">{{ __($primaryLabel) }}</x-ui.button>
<x-ui.button :href="$outlineHref" variant="outline">
<x-slot:icon>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="size-4" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<polygon points="10 8 16 12 10 16 10 8" fill="currentColor" stroke="none" />
</svg>
</x-slot:icon>
{{ __($outlineLabel) }}
</x-ui.button>
</div>
</div>
<div class="mt-12 border-t border-border pt-10">
<dl class="grid grid-cols-2 gap-x-6 gap-y-10 lg:grid-cols-4">
@foreach ($stats as $index => $stat)
<div class="flex flex-col items-center gap-2 text-center {{ $index >= 1 ? 'lg:border-s lg:border-border lg:ps-6' : '' }}">
<dt class="text-3xl font-bold tracking-tight text-foreground sm:text-4xl">{{ $stat['number'] }}</dt>
<dd class="text-sm font-medium text-muted-foreground">{{ __($stat['label']) }}</dd>
</div>
@endforeach
</dl>
</div>
</section>
Ownership & lifecycle
Owner, release state, review evidence and adoption for this item.
- Owner
- Platform UI (@JoshJML)
- Current version
-
1.0.3 - Status
- Stable
- License
-
open - Deprecation
- Not deprecated
- Contract
-
v1 - Foundation
-
≥ 1.0.0