Skip to content
Brok UI

Loading…

No results

Hero

Open source

Marketing hero sections: centred, split, search, form, video, stats, screenshot and more; the centred hero takes a switchable backdrop.

Preview

14 of 15

resources/views/blocks/hero-reviews.blade.php Blade
@props([
    'eyebrow'        => 'Loved by builders',
    'heading'        => 'The toolkit founders actually recommend',
    'subheading'     => 'Join thousands of teams shipping faster with components they own. No lock-in, no runtime dependency — just code you control.',
    'primaryCta'     => 'Start building free',
    'primaryHref'    => '#',
    'secondaryCta'   => 'Read the reviews',
    'secondaryHref'  => '#',
    'avatars'        => null,
    'ratingValue'    => 4.9,
    'ratingLabel'    => 'Rated 4.9/5 by 2,000+ founders',
    'partners'       => null,
])

@php
    $avatars ??= [
        ['src' => 'https://picsum.photos/seed/ava/80/80', 'name' => 'Ava Chen'],
        ['src' => 'https://picsum.photos/seed/bram/80/80', 'name' => 'Bram Diaz'],
        ['src' => 'https://picsum.photos/seed/cleo/80/80', 'name' => 'Cleo Park'],
        ['src' => 'https://picsum.photos/seed/dev/80/80', 'name' => 'Dev Rao'],
        ['src' => 'https://picsum.photos/seed/esme/80/80', 'name' => 'Esme Liu'],
    ];

    $partners ??= ['Northwind', 'Acme Co', 'Lumen', 'Vertex', 'Cobalt'];

    // Whole-/half-star summary read by the avatar group's accessible label so AT
    // hears the social proof, not just the decorative faces.
    $reviewerCount = max(0, count($avatars));
@endphp

<x-ui.section data-slot="hero-21" space="none" class="relative isolate overflow-hidden" {{ $attributes }}>
    <div class="mx-auto flex max-w-3xl flex-col items-center px-4 py-20 text-center sm:py-28">
        @if ($eyebrow)
            <x-ui.badge variant="secondary" class="mb-6">{{ __($eyebrow) }}</x-ui.badge>
        @endif

        <h1 class="text-balance text-4xl font-bold tracking-tight sm:text-5xl lg:text-6xl">
            {{ __($heading) }}
        </h1>

        <p class="mx-auto mt-6 max-w-2xl text-pretty text-lg text-muted-foreground">
            {{ __($subheading) }}
        </p>

        <div class="mt-10 flex w-full flex-col items-center justify-center gap-4 sm:w-auto sm:flex-row">
            <x-ui.button :href="$primaryHref" size="lg" class="w-full sm:w-auto">{{ __($primaryCta) }}</x-ui.button>
            @if ($secondaryCta)
                <x-ui.button :href="$secondaryHref" size="lg" variant="outline" class="w-full sm:w-auto">{{ __($secondaryCta) }}</x-ui.button>
            @endif
        </div>

        {{-- Social-proof cluster: overlapping faces + a committed rating + a summary line. --}}
        <div class="mt-12 flex flex-col items-center gap-4 sm:flex-row sm:gap-6">
            <x-ui.avatar-group
                :avatars="$avatars"
                :max="4"
                size="md"
                aria-label="{{ __(':count happy customers', ['count' => $reviewerCount]) }}"
            />

            <div class="flex flex-col items-center gap-2 sm:items-start">
                <x-ui.rating :value="$ratingValue" :max="5" :read-only="true" size="sm" />
                <p class="text-sm text-muted-foreground">{{ __($ratingLabel) }}</p>
            </div>
        </div>

        @if (! empty($partners))
            <div class="mt-14 w-full border-t border-border pt-8">
                <p class="text-sm font-medium uppercase tracking-wide text-muted-foreground">
                    {{ __('Powering teams at') }}
                </p>
                <ul class="mt-4 flex flex-wrap items-center justify-center gap-x-8 gap-y-4">
                    @foreach ($partners as $partner)
                        <li class="text-sm font-semibold tracking-tight text-foreground">
                            {{ __($partner) }}
                        </li>
                    @endforeach
                </ul>
            </div>
        @endif
    </div>
</x-ui.section>

Installation

terminal
php artisan ui:add blocks/hero-reviews

Installs these dependencies automatically:

Registry contract

Install confidence

php artisan ui:add blocks/hero-reviews 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/hero-reviews.blade.php

Registry dependencies

avatar-group badge button rating section

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.

hero-reviews.md
# Brok UI block: Hero Reviews (`hero-reviews`)

A centered, social-proof marketing hero: eyebrow badge, headline, subcopy, and a dual call-to-action, anchored by a trust cluster of overlapping customer avatars, a 4.9-star rating, and a 'Rated 4.9/5 by 2,000+ founders' summary line, with an optional strip of partner wordmarks.

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-reviews
```

## Render it

```blade
<x-blocks.hero-reviews />
```

## Props

- `eyebrow` (string, default `Loved by builders`) — Small label shown above the heading inside a badge; falsy hides the badge.
- `heading` (string, default `The toolkit founders actually recommend`) — Primary headline.
- `subheading` (string, default `Join thousands of teams shipping faster with components they own. No lock-in, no runtime dependency — just code you control.`) — Supporting copy under the heading.
- `primary-cta` (string, default `Start building free`) — Primary button label.
- `primary-href` (string, default `#`) — Primary button destination.
- `secondary-cta` (string, default `Read the reviews`) — Secondary button label; falsy hides the secondary button.
- `secondary-href` (string, default `#`) — Secondary button destination.
- `avatars` (mixed|null, default `null`) — Rows of {src, name} rendered in the avatar stack; null falls back to a default 5-person sample.
- `rating-value` (float, default `4.9`) — Star rating value out of 5, shown read-only.
- `rating-label` (string, default `Rated 4.9/5 by 2,000+ founders`) — Caption shown under the rating.
- `partners` (mixed|null, default `null`) — Partner or customer names rendered as a wordmark strip; null falls back to a default 5-name sample, empty array hides the strip.

## Use when

- Opening a marketing page anchored by social proof: a centered headline and dual CTA followed by an overlapping avatar stack, a star rating, and a 'rated X/5 by N' summary line.
- Wanting an optional strip of partner or customer wordmarks below the rating cluster.

## Avoid when

- Needing the avatar row alone without a star rating or logo strip; use hero-split for a lighter trust-row treatment, or hero-form if the social proof should sit under a signup form instead of CTA buttons.

## Rules

- Render the installed block with `<x-blocks.hero-reviews />` 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-reviews
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/hero-reviews.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 anchored by social proof: a centered headline and dual CTA followed by an overlapping avatar stack, a star rating, and a 'rated X/5 by N' summary line.
  • Wanting an optional strip of partner or customer wordmarks below the rating cluster.

Avoid when

  • Needing the avatar row alone without a star rating or logo strip; use hero-split for a lighter trust-row treatment, or hero-form if the social proof should sit under a signup form instead of CTA buttons.

Anti-patterns

  • Do not replace semantic props with conflicting utility classes.
  • Do not remove labels, focus styles, or state attributes.
Anatomy
eyebrow badge heading subheading primary cta secondary cta avatar group star rating rating summary line partner wordmark strip

Usage

Render the block as a component, passing data where useful:

resources/views/welcome.blade.php Blade
<x-blocks.hero-reviews />

Built from primitives

Composes <brok:*> Semantic tokens Re-themeable RTL-ready

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.

resources/views/blocks/hero-reviews.blade.php Blade
@props([
    'eyebrow'        => 'Loved by builders',
    'heading'        => 'The toolkit founders actually recommend',
    'subheading'     => 'Join thousands of teams shipping faster with components they own. No lock-in, no runtime dependency — just code you control.',
    'primaryCta'     => 'Start building free',
    'primaryHref'    => '#',
    'secondaryCta'   => 'Read the reviews',
    'secondaryHref'  => '#',
    'avatars'        => null,
    'ratingValue'    => 4.9,
    'ratingLabel'    => 'Rated 4.9/5 by 2,000+ founders',
    'partners'       => null,
])

@php
    $avatars ??= [
        ['src' => 'https://picsum.photos/seed/ava/80/80', 'name' => 'Ava Chen'],
        ['src' => 'https://picsum.photos/seed/bram/80/80', 'name' => 'Bram Diaz'],
        ['src' => 'https://picsum.photos/seed/cleo/80/80', 'name' => 'Cleo Park'],
        ['src' => 'https://picsum.photos/seed/dev/80/80', 'name' => 'Dev Rao'],
        ['src' => 'https://picsum.photos/seed/esme/80/80', 'name' => 'Esme Liu'],
    ];

    $partners ??= ['Northwind', 'Acme Co', 'Lumen', 'Vertex', 'Cobalt'];

    // Whole-/half-star summary read by the avatar group's accessible label so AT
    // hears the social proof, not just the decorative faces.
    $reviewerCount = max(0, count($avatars));
@endphp

<x-ui.section data-slot="hero-21" space="none" class="relative isolate overflow-hidden" {{ $attributes }}>
    <div class="mx-auto flex max-w-3xl flex-col items-center px-4 py-20 text-center sm:py-28">
        @if ($eyebrow)
            <x-ui.badge variant="secondary" class="mb-6">{{ __($eyebrow) }}</x-ui.badge>
        @endif

        <h1 class="text-balance text-4xl font-bold tracking-tight sm:text-5xl lg:text-6xl">
            {{ __($heading) }}
        </h1>

        <p class="mx-auto mt-6 max-w-2xl text-pretty text-lg text-muted-foreground">
            {{ __($subheading) }}
        </p>

        <div class="mt-10 flex w-full flex-col items-center justify-center gap-4 sm:w-auto sm:flex-row">
            <x-ui.button :href="$primaryHref" size="lg" class="w-full sm:w-auto">{{ __($primaryCta) }}</x-ui.button>
            @if ($secondaryCta)
                <x-ui.button :href="$secondaryHref" size="lg" variant="outline" class="w-full sm:w-auto">{{ __($secondaryCta) }}</x-ui.button>
            @endif
        </div>

        {{-- Social-proof cluster: overlapping faces + a committed rating + a summary line. --}}
        <div class="mt-12 flex flex-col items-center gap-4 sm:flex-row sm:gap-6">
            <x-ui.avatar-group
                :avatars="$avatars"
                :max="4"
                size="md"
                aria-label="{{ __(':count happy customers', ['count' => $reviewerCount]) }}"
            />

            <div class="flex flex-col items-center gap-2 sm:items-start">
                <x-ui.rating :value="$ratingValue" :max="5" :read-only="true" size="sm" />
                <p class="text-sm text-muted-foreground">{{ __($ratingLabel) }}</p>
            </div>
        </div>

        @if (! empty($partners))
            <div class="mt-14 w-full border-t border-border pt-8">
                <p class="text-sm font-medium uppercase tracking-wide text-muted-foreground">
                    {{ __('Powering teams at') }}
                </p>
                <ul class="mt-4 flex flex-wrap items-center justify-center gap-x-8 gap-y-4">
                    @foreach ($partners as $partner)
                        <li class="text-sm font-semibold tracking-tight text-foreground">
                            {{ __($partner) }}
                        </li>
                    @endforeach
                </ul>
            </div>
        @endif
    </div>
</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