Hero
Marketing hero sections: centred, split, search, form, video, stats, screenshot and more; the centred hero takes a switchable backdrop.
Preview
@props([
'eyebrow' => 'Now in public beta',
'heading' => 'Everything you need, in one place',
'subheading' => 'A Laravel-native UI and blocks system you copy into your own codebase. Own the source, theme with design tokens, and ship faster.',
'primaryCta' => 'Get started free',
'primaryHref' => '#',
'secondaryCta' => 'Book a demo',
'secondaryHref' => '#',
'footnote' => 'No credit card required',
'avatars' => ['SA', 'JM', 'KR', 'TW'],
])
<section data-slot="hero-23" {{ $attributes->merge(['class' => 'relative isolate overflow-hidden bg-muted/40 text-foreground']) }}>
<div class="mx-auto max-w-5xl px-4 py-16 sm:py-24">
<x-ui.card class="relative overflow-hidden rounded-lg border border-border px-6 py-16 text-center shadow-sm sm:px-12 sm:py-20">
<div class="mx-auto max-w-2xl">
@if (! empty($avatars))
<x-ui.avatar-group :avatars="array_map(fn ($avatar) => is_array($avatar) ? $avatar : ['src' => null, 'name' => $avatar, 'initials' => $avatar], $avatars)" :max="count($avatars)" class="mb-8 justify-center" aria-hidden="true" />
@endif
@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">
{{ __($heading) }}
</h1>
<p class="mx-auto mt-6 max-w-xl text-pretty text-lg text-muted-foreground">
{{ __($subheading) }}
</p>
<div class="mt-10 flex flex-col items-center justify-center gap-4 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>
@if ($footnote)
<p class="mt-6 text-sm text-muted-foreground">{{ __($footnote) }}</p>
@endif
</div>
</x-ui.card>
</div>
</section>
Installation
php artisan ui:add blocks/hero-island
Registry contract
Install confidence
php artisan ui:add blocks/hero-island
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/hero-island.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 Card (`hero-island`)
A boxed island marketing hero: on a subtle muted backdrop sits a single large centered card with a strong rounded-3xl border, holding a small avatar trust strip, an eyebrow badge, a large headline, muted subcopy, a primary and secondary call-to-action pair, and a reassuring footnote line.
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-island
```
## Render it
```blade
<x-blocks.hero-island />
```
## Props
- `eyebrow` (string, default `Now in public beta`) — Small label shown above the heading inside a badge; falsy hides the badge.
- `heading` (string, default `Everything you need, in one place`) — Primary headline.
- `subheading` (string, default `A Laravel-native UI and blocks system you copy into your own codebase. Own the source, theme with design tokens, and ship faster.`) — Supporting copy under the heading.
- `primary-cta` (string, default `Get started free`) — Primary button label.
- `primary-href` (string, default `#`) — Primary button destination.
- `secondary-cta` (string, default `Book a demo`) — Secondary button label; falsy hides the secondary button.
- `secondary-href` (string, default `#`) — Secondary button destination.
- `footnote` (string, default `No credit card required`) — Reassurance line shown under the CTAs; falsy hides it.
- `avatars` (array, default `['SA', 'JM', 'KR', 'TW']`) — Names or {src, name} rows rendered in the avatar trust strip above the eyebrow.
## Use when
- Opening a marketing page where the hero content should read as a distinct, elevated card sitting on a muted backdrop rather than blending into the page background.
- Wanting a small avatar trust strip and a reassuring footnote line (e.g. 'No credit card required') under the CTA pair.
## Avoid when
- Needing the hero content to sit flush against the page background instead of inside a bordered card; use hero-centered or hero-split instead.
## Rules
- Render the installed block with `<x-blocks.hero-island />` 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-island
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/hero-island.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 where the hero content should read as a distinct, elevated card sitting on a muted backdrop rather than blending into the page background.
- Wanting a small avatar trust strip and a reassuring footnote line (e.g. 'No credit card required') under the CTA pair.
Avoid when
- Needing the hero content to sit flush against the page background instead of inside a bordered card; use hero-centered or hero-split instead.
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-island />
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' => 'Now in public beta',
'heading' => 'Everything you need, in one place',
'subheading' => 'A Laravel-native UI and blocks system you copy into your own codebase. Own the source, theme with design tokens, and ship faster.',
'primaryCta' => 'Get started free',
'primaryHref' => '#',
'secondaryCta' => 'Book a demo',
'secondaryHref' => '#',
'footnote' => 'No credit card required',
'avatars' => ['SA', 'JM', 'KR', 'TW'],
])
<section data-slot="hero-23" {{ $attributes->merge(['class' => 'relative isolate overflow-hidden bg-muted/40 text-foreground']) }}>
<div class="mx-auto max-w-5xl px-4 py-16 sm:py-24">
<x-ui.card class="relative overflow-hidden rounded-lg border border-border px-6 py-16 text-center shadow-sm sm:px-12 sm:py-20">
<div class="mx-auto max-w-2xl">
@if (! empty($avatars))
<x-ui.avatar-group :avatars="array_map(fn ($avatar) => is_array($avatar) ? $avatar : ['src' => null, 'name' => $avatar, 'initials' => $avatar], $avatars)" :max="count($avatars)" class="mb-8 justify-center" aria-hidden="true" />
@endif
@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">
{{ __($heading) }}
</h1>
<p class="mx-auto mt-6 max-w-xl text-pretty text-lg text-muted-foreground">
{{ __($subheading) }}
</p>
<div class="mt-10 flex flex-col items-center justify-center gap-4 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>
@if ($footnote)
<p class="mt-6 text-sm text-muted-foreground">{{ __($footnote) }}</p>
@endif
</div>
</x-ui.card>
</div>
</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