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

6 of 15

resources/views/blocks/hero-spotlight.blade.php Blade
@props([
    'pillBadge' => 'New',
    'pillLabel' => 'Introducing token theming v2',
    'pillHref' => '#',
    'heading' => 'The fastest way to ship',
    'headingEmphasis' => 'a polished product',
    'subheading' => 'A Laravel-native UI and blocks system you install into your own codebase. Own the source, theme with design tokens, and update safely — no runtime dependency.',
    'primaryCta' => 'Get started',
    'primaryHref' => '#',
    'secondaryCta' => 'Live demo',
    'secondaryHref' => '#',
    'url' => 'app.example.com',
])

<x-ui.section space="none" class="relative isolate overflow-hidden" {{ $attributes }}>
    {{-- Soft spotlight blooming behind the content --}}
    <x-ui.glow variant="top" />

    <div class="relative z-10 mx-auto max-w-3xl px-4 pt-20 text-center sm:pt-28">
        @if ($pillLabel)
            <x-ui.button :href="$pillHref" variant="secondary" size="sm" shape="pill" :with-arrow="true" class="ps-2 text-muted-foreground">
                <x-ui.badge size="sm">✨ {{ __($pillBadge) }}</x-ui.badge>
                {{ __($pillLabel) }}
            </x-ui.button>
        @endif

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

        <p class="mx-auto mt-6 max-w-prose 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 gap-2 sm:w-auto">
                    <svg class="size-4 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">
                        <polygon points="6 3 20 12 6 21 6 3" />
                    </svg>
                    {{ __($secondaryCta) }}
                </x-ui.button>
            @endif
        </div>
    </div>

    {{-- Product screenshot framed in a browser window, lit by the glow above --}}
    <div class="relative z-10 mx-auto mt-16 max-w-5xl px-4 pb-20 sm:pb-28">
        <x-ui.mockup type="browser" size="large" :url="$url">
            <div class="aspect-[16/9] w-full bg-muted"></div>
        </x-ui.mockup>
    </div>
</x-ui.section>

Installation

terminal
php artisan ui:add blocks/hero-spotlight

Installs these dependencies automatically:

Registry contract

Install confidence

php artisan ui:add blocks/hero-spotlight 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.8
License
open
Stability
stable
Contract
v1
Foundation
≥ 1.0.0
Type Generated target
blade resources/views/blocks/hero-spotlight.blade.php

Registry dependencies

badge button glow mockup 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-spotlight.md
# Brok UI block: Hero Spotlight (`hero-spotlight`)

A centered 'spotlight' marketing hero: an announcement pill, a two-line headline with an emphasised second line, a muted subheading, a dual call-to-action, and a bordered browser-window product screenshot lit by a soft glow.

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

## Render it

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

## Props

- `pill-badge` (string, default `New`) — Small badge text inside the announcement pill.
- `pill-label` (string, default `Introducing token theming v2`) — Announcement pill text; falsy hides the pill.
- `pill-href` (string, default `#`) — Announcement pill destination.
- `heading` (string, default `The fastest way to ship`) — First line of the headline.
- `heading-emphasis` (string, default `a polished product`) — Second, colour-emphasised line of the headline.
- `subheading` (string, default `A Laravel-native UI and blocks system you install into your own codebase. Own the source, theme with design tokens, and update safely — no runtime dependency.`) — Supporting copy under the heading.
- `primary-cta` (string, default `Get started`) — Primary button label.
- `primary-href` (string, default `#`) — Primary button destination.
- `secondary-cta` (string, default `Live demo`) — Secondary button label; falsy hides the secondary button.
- `secondary-href` (string, default `#`) — Secondary button destination.
- `url` (string, default `app.example.com`) — URL shown in the mockup's fake browser address bar.

## Use when

- Opening a marketing page with a clickable announcement pill above a two-line headline whose second line is emphasised in the primary colour.
- Wanting a bordered browser-window screenshot lit by a soft top glow below the copy.

## Avoid when

- Needing the mockup filled with a fully composed dashboard illustration instead of an empty placeholder pane; use hero-mockup or hero-screenshot instead.

## Rules

- Render the installed block with `<x-blocks.hero-spotlight />` 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-spotlight
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/hero-spotlight.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 with a clickable announcement pill above a two-line headline whose second line is emphasised in the primary colour.
  • Wanting a bordered browser-window screenshot lit by a soft top glow below the copy.

Avoid when

  • Needing the mockup filled with a fully composed dashboard illustration instead of an empty placeholder pane; use hero-mockup or hero-screenshot instead.

Anti-patterns

  • Do not replace semantic props with conflicting utility classes.
  • Do not remove labels, focus styles, or state attributes.
Anatomy
section top glow announcement pill heading emphasized heading line subheading primary cta secondary cta browser mockup

Usage

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

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

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-spotlight.blade.php Blade
@props([
    'pillBadge' => 'New',
    'pillLabel' => 'Introducing token theming v2',
    'pillHref' => '#',
    'heading' => 'The fastest way to ship',
    'headingEmphasis' => 'a polished product',
    'subheading' => 'A Laravel-native UI and blocks system you install into your own codebase. Own the source, theme with design tokens, and update safely — no runtime dependency.',
    'primaryCta' => 'Get started',
    'primaryHref' => '#',
    'secondaryCta' => 'Live demo',
    'secondaryHref' => '#',
    'url' => 'app.example.com',
])

<x-ui.section space="none" class="relative isolate overflow-hidden" {{ $attributes }}>
    {{-- Soft spotlight blooming behind the content --}}
    <x-ui.glow variant="top" />

    <div class="relative z-10 mx-auto max-w-3xl px-4 pt-20 text-center sm:pt-28">
        @if ($pillLabel)
            <x-ui.button :href="$pillHref" variant="secondary" size="sm" shape="pill" :with-arrow="true" class="ps-2 text-muted-foreground">
                <x-ui.badge size="sm">✨ {{ __($pillBadge) }}</x-ui.badge>
                {{ __($pillLabel) }}
            </x-ui.button>
        @endif

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

        <p class="mx-auto mt-6 max-w-prose 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 gap-2 sm:w-auto">
                    <svg class="size-4 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">
                        <polygon points="6 3 20 12 6 21 6 3" />
                    </svg>
                    {{ __($secondaryCta) }}
                </x-ui.button>
            @endif
        </div>
    </div>

    {{-- Product screenshot framed in a browser window, lit by the glow above --}}
    <div class="relative z-10 mx-auto mt-16 max-w-5xl px-4 pb-20 sm:pb-28">
        <x-ui.mockup type="browser" size="large" :url="$url">
            <div class="aspect-[16/9] w-full bg-muted"></div>
        </x-ui.mockup>
    </div>
</x-ui.section>

Ownership & lifecycle

Owner, release state, review evidence and adoption for this item.
Owner
Platform UI (@JoshJML)
Current version
1.0.8
Status
Stable
License
open
Deprecation
Not deprecated
Contract
v1
Foundation
≥ 1.0.0