Skip to content
Brok UI

Loading…

No results

Testimonials

Open source

Social-proof sections — grids, a single hero quote, a masonry wall, marquees and a carousel.

Preview

7 of 10

resources/views/blocks/testimonials-split.blade.php Blade
@props([
    'eyebrow'     => 'Testimonials',
    'heading'     => 'Trusted by teams that ship',
    'lead'        => 'From indie hackers to enterprise engineering orgs — here\'s what they say about building with our component system.',
    'ratingScore' => '4.9',
    'ratingCount' => '1,200',
    'logos'       => null,
    'testimonials'=> null,
])

@php
    $logos ??= [
        ['label' => 'Acme Corp'],
        ['label' => 'Globex'],
        ['label' => 'Initech'],
        ['label' => 'Umbrella'],
    ];

    $testimonials ??= [
        ['quote' => 'Shipping a polished dashboard used to take weeks. With this system we had our first production screen in an afternoon. The token layer alone saved our design-to-code handoff.', 'name' => 'Priya Nair', 'role' => 'Head of Product', 'company' => 'Acme Corp', 'src' => null, 'fallback' => 'PN'],
        ['quote' => 'Every block composes cleanly with our existing Blade views. RTL support and dark-mode came for free — no custom CSS, no overrides, no surprises.', 'name' => 'Lucas Ferreira', 'role' => 'Senior Engineer', 'company' => 'Globex', 'src' => null, 'fallback' => 'LF'],
        ['quote' => 'The copy-into-your-app model was the deciding factor. We own the code; audits are straightforward; and we can extend anything without forking a dependency.', 'name' => 'Aisha Kamara', 'role' => 'CTO', 'company' => 'Initech', 'src' => null, 'fallback' => 'AK'],
    ];
@endphp

<x-ui.section data-slot="testimonials-split" space="xl" {{ $attributes }}>
    <x-ui.container size="xl" gutter="sm">
        <div class="lg:grid lg:grid-cols-2 lg:gap-x-16 xl:gap-x-24">
            <div class="lg:sticky lg:top-24 lg:self-start">
                <x-ui.badge variant="outline" class="mb-4">{{ __($eyebrow) }}</x-ui.badge>
                <h2 class="text-3xl font-bold tracking-tight sm:text-4xl">{{ __($heading) }}</h2>
                <p class="mt-4 text-base leading-relaxed text-muted-foreground">{{ __($lead) }}</p>

                <div class="mt-8 flex items-center gap-x-4">
                    <div class="flex items-center gap-x-0.5" role="img" aria-label="{{ __(':score out of 5 stars', ['score' => $ratingScore]) }}">
                        @for ($i = 0; $i < 5; $i++)
                            <svg viewBox="0 0 20 20" fill="currentColor" class="size-5 text-warning" aria-hidden="true">
                                <path fill-rule="evenodd" d="M10.868 2.884c-.321-.772-1.415-.772-1.736 0l-1.83 4.401-4.753.381c-.833.067-1.171 1.107-.536 1.651l3.62 3.102-1.106 4.637c-.194.813.691 1.456 1.405 1.02L10 15.591l4.069 2.485c.713.436 1.598-.207 1.404-1.02l-1.106-4.637 3.62-3.102c.635-.544.297-1.584-.536-1.65l-4.752-.382-1.831-4.401Z" clip-rule="evenodd" />
                            </svg>
                        @endfor
                    </div>
                    <p class="text-sm text-muted-foreground"><span class="font-semibold text-foreground">{{ $ratingScore }}</span> {{ __('from :count reviews', ['count' => $ratingCount]) }}</p>
                </div>

                <div class="mt-10 border-t border-border pt-8">
                    <p class="mb-6 text-sm font-medium uppercase tracking-widest text-muted-foreground">{{ __('Trusted by') }}</p>
                    <div class="flex flex-wrap items-center gap-x-8 gap-y-4">
                        @foreach ($logos as $logo)
                            <span class="select-none text-base font-semibold text-muted-foreground transition-colors duration-200 hover:text-muted-foreground" aria-label="{{ $logo['label'] }}">{{ $logo['label'] }}</span>
                        @endforeach
                    </div>
                </div>
            </div>

            <div class="mt-12 flex flex-col gap-y-6 lg:mt-0">
                @foreach ($testimonials as $testimonial)
                    <x-ui.quote-card
                        glyph="solid"
                        size="md"
                        :divider="false"
                        :quote="__($testimonial['quote'])"
                        :name="__($testimonial['name'])"
                        :role="__($testimonial['role'])"
                        :company="__($testimonial['company'])"
                        :avatar="$testimonial['src'] ?? null"
                        :initials="$testimonial['fallback'] ?? null"
                        class="sm:p-8"
                    />
                @endforeach
            </div>
        </div>
    </x-ui.container>
</x-ui.section>

Installation

terminal
php artisan ui:add blocks/testimonials-split

Installs these dependencies automatically:

Registry contract

Install confidence

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

Registry dependencies

badge container quote-card 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.

testimonials-split.md
# Brok UI block: Testimonials Split (`testimonials-split`)

A two-column testimonials section with a sticky intro, customer logos and aggregate rating beside a stack of rich quote cards with avatars.

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/testimonials-split
```

## Render it

```blade
<x-blocks.testimonials-split />
```

## Props

- `eyebrow` (string, default `Testimonials`) — Small label shown above the heading.
- `heading` (string, default `Trusted by teams that ship`) — Section heading.
- `lead` (string, default `From indie hackers to enterprise engineering orgs — here\'s what they say about building with our component system.`) — Supporting lead paragraph under the heading.
- `rating-score` (string, default `4.9`) — Aggregate rating score shown beside the stars.
- `rating-count` (string, default `1,200`) — Review count shown beside the rating.
- `logos` (mixed|null, default `null`) — Customer wordmark entries; null falls back to sample data.
- `testimonials` (mixed|null, default `null`) — Quote entries with quote text, name, role, company and avatar; null falls back to sample data.

## Use when

- Pairing a sticky intro column with customer logos and an aggregate rating beside a stack of rich quote cards.
- Needing both a persuasive lead-in and logo-level trust markers.

## Avoid when

- Not having customer logos to show alongside quotes; use testimonials-grid instead.

## Rules

- Render the installed block with `<x-blocks.testimonials-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/testimonials-split
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/testimonials-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 sticky intro column with customer logos and an aggregate rating beside a stack of rich quote cards.
  • Needing both a persuasive lead-in and logo-level trust markers.

Avoid when

  • Not having customer logos to show alongside quotes; use testimonials-grid instead.

Anti-patterns

  • Do not replace semantic props with conflicting utility classes.
  • Do not remove labels, focus styles, or state attributes.
Anatomy
root testimonials-split

Usage

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

resources/views/welcome.blade.php Blade
<x-blocks.testimonials-split />

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/testimonials-split.blade.php Blade
@props([
    'eyebrow'     => 'Testimonials',
    'heading'     => 'Trusted by teams that ship',
    'lead'        => 'From indie hackers to enterprise engineering orgs — here\'s what they say about building with our component system.',
    'ratingScore' => '4.9',
    'ratingCount' => '1,200',
    'logos'       => null,
    'testimonials'=> null,
])

@php
    $logos ??= [
        ['label' => 'Acme Corp'],
        ['label' => 'Globex'],
        ['label' => 'Initech'],
        ['label' => 'Umbrella'],
    ];

    $testimonials ??= [
        ['quote' => 'Shipping a polished dashboard used to take weeks. With this system we had our first production screen in an afternoon. The token layer alone saved our design-to-code handoff.', 'name' => 'Priya Nair', 'role' => 'Head of Product', 'company' => 'Acme Corp', 'src' => null, 'fallback' => 'PN'],
        ['quote' => 'Every block composes cleanly with our existing Blade views. RTL support and dark-mode came for free — no custom CSS, no overrides, no surprises.', 'name' => 'Lucas Ferreira', 'role' => 'Senior Engineer', 'company' => 'Globex', 'src' => null, 'fallback' => 'LF'],
        ['quote' => 'The copy-into-your-app model was the deciding factor. We own the code; audits are straightforward; and we can extend anything without forking a dependency.', 'name' => 'Aisha Kamara', 'role' => 'CTO', 'company' => 'Initech', 'src' => null, 'fallback' => 'AK'],
    ];
@endphp

<x-ui.section data-slot="testimonials-split" space="xl" {{ $attributes }}>
    <x-ui.container size="xl" gutter="sm">
        <div class="lg:grid lg:grid-cols-2 lg:gap-x-16 xl:gap-x-24">
            <div class="lg:sticky lg:top-24 lg:self-start">
                <x-ui.badge variant="outline" class="mb-4">{{ __($eyebrow) }}</x-ui.badge>
                <h2 class="text-3xl font-bold tracking-tight sm:text-4xl">{{ __($heading) }}</h2>
                <p class="mt-4 text-base leading-relaxed text-muted-foreground">{{ __($lead) }}</p>

                <div class="mt-8 flex items-center gap-x-4">
                    <div class="flex items-center gap-x-0.5" role="img" aria-label="{{ __(':score out of 5 stars', ['score' => $ratingScore]) }}">
                        @for ($i = 0; $i < 5; $i++)
                            <svg viewBox="0 0 20 20" fill="currentColor" class="size-5 text-warning" aria-hidden="true">
                                <path fill-rule="evenodd" d="M10.868 2.884c-.321-.772-1.415-.772-1.736 0l-1.83 4.401-4.753.381c-.833.067-1.171 1.107-.536 1.651l3.62 3.102-1.106 4.637c-.194.813.691 1.456 1.405 1.02L10 15.591l4.069 2.485c.713.436 1.598-.207 1.404-1.02l-1.106-4.637 3.62-3.102c.635-.544.297-1.584-.536-1.65l-4.752-.382-1.831-4.401Z" clip-rule="evenodd" />
                            </svg>
                        @endfor
                    </div>
                    <p class="text-sm text-muted-foreground"><span class="font-semibold text-foreground">{{ $ratingScore }}</span> {{ __('from :count reviews', ['count' => $ratingCount]) }}</p>
                </div>

                <div class="mt-10 border-t border-border pt-8">
                    <p class="mb-6 text-sm font-medium uppercase tracking-widest text-muted-foreground">{{ __('Trusted by') }}</p>
                    <div class="flex flex-wrap items-center gap-x-8 gap-y-4">
                        @foreach ($logos as $logo)
                            <span class="select-none text-base font-semibold text-muted-foreground transition-colors duration-200 hover:text-muted-foreground" aria-label="{{ $logo['label'] }}">{{ $logo['label'] }}</span>
                        @endforeach
                    </div>
                </div>
            </div>

            <div class="mt-12 flex flex-col gap-y-6 lg:mt-0">
                @foreach ($testimonials as $testimonial)
                    <x-ui.quote-card
                        glyph="solid"
                        size="md"
                        :divider="false"
                        :quote="__($testimonial['quote'])"
                        :name="__($testimonial['name'])"
                        :role="__($testimonial['role'])"
                        :company="__($testimonial['company'])"
                        :avatar="$testimonial['src'] ?? null"
                        :initials="$testimonial['fallback'] ?? null"
                        class="sm:p-8"
                    />
                @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