Banner Newsletter
An inline newsletter call-to-action banner pairing an icon, heading and copy with an email subscribe form and privacy note.
Preview
@props([
'heading' => 'Stay in the loop',
'description' => 'Get the latest updates, articles, and resources delivered straight to your inbox.',
'privacy' => 'We\'ll never share your email.',
'placeholder' => 'you@example.com',
'buttonLabel' => 'Subscribe',
'action' => '#',
])
<x-ui.section space="lg" {{ $attributes }}>
<x-ui.container gutter="sm">
<div class="rounded-lg border border-border bg-card px-6 py-8 sm:px-10 sm:py-10">
<div class="flex flex-col gap-6 lg:flex-row lg:items-center lg:justify-between">
<div class="flex flex-col gap-4">
<div class="flex items-center gap-4">
<x-ui.icon.tile>
<svg class="size-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="2" y="4" width="20" height="16" rx="2" /><path d="m2 7 9.1 6.1a1.5 1.5 0 0 0 1.8 0L22 7" />
</svg>
</x-ui.icon.tile>
<h2 class="text-xl font-semibold tracking-tight text-card-foreground">{{ __($heading) }}</h2>
</div>
<p class="max-w-prose text-sm leading-relaxed text-muted-foreground">{{ __($description) }}</p>
</div>
<div class="flex w-full flex-col gap-2 lg:max-w-md">
<form method="POST" action="{{ $action }}" class="flex w-full flex-col gap-2 sm:flex-row">
@csrf
<label for="newsletter-banner-email" class="sr-only">{{ __('Email address') }}</label>
<x-ui.input id="newsletter-banner-email" type="email" name="email" autocomplete="email" :placeholder="__($placeholder)" required class="w-full" />
<x-ui.button type="submit" variant="default" class="shrink-0">{{ __($buttonLabel) }}</x-ui.button>
</form>
<p class="text-xs text-muted-foreground">{{ __($privacy) }}</p>
</div>
</div>
</div>
</x-ui.container>
</x-ui.section>
Installation
php artisan ui:add blocks/banner-newsletter
Registry contract
Install confidence
php artisan ui:add blocks/banner-newsletter
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/banner-newsletter.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: Banner Newsletter (`banner-newsletter`)
An inline newsletter call-to-action banner pairing an icon, heading and copy with an email subscribe form and privacy note.
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/banner-newsletter
```
## Render it
```blade
<x-blocks.banner-newsletter />
```
## Props
- `heading` (string, default `Stay in the loop`)
- `description` (string, default `Get the latest updates, articles, and resources delivered straight to your inbox.`)
- `privacy` (string, default `We\'ll never share your email.`)
- `placeholder` (string, default `[email protected]`)
- `button-label` (string, default `Subscribe`)
- `action` (string, default `#`)
## Use when
- Inviting an email subscription inline on a page via an icon, heading and copy beside a subscribe form.
- Reassuring the visitor with a short privacy note next to the email field.
## Avoid when
- Use footer-newsletter for a newsletter form built into the site footer instead of a standalone inline banner.
## Rules
- Render the installed block with `<x-blocks.banner-newsletter />` 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/banner-newsletter
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/banner-newsletter.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
- Inviting an email subscription inline on a page via an icon, heading and copy beside a subscribe form.
- Reassuring the visitor with a short privacy note next to the email field.
Avoid when
- Use footer-newsletter for a newsletter form built into the site footer instead of a standalone inline banner.
Anti-patterns
- Do not replace semantic props with conflicting utility classes.
- Do not remove labels, focus styles, or state attributes.
Usage
Render the block as a component, passing data where useful:
<x-blocks.banner-newsletter />
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([
'heading' => 'Stay in the loop',
'description' => 'Get the latest updates, articles, and resources delivered straight to your inbox.',
'privacy' => 'We\'ll never share your email.',
'placeholder' => 'you@example.com',
'buttonLabel' => 'Subscribe',
'action' => '#',
])
<x-ui.section space="lg" {{ $attributes }}>
<x-ui.container gutter="sm">
<div class="rounded-lg border border-border bg-card px-6 py-8 sm:px-10 sm:py-10">
<div class="flex flex-col gap-6 lg:flex-row lg:items-center lg:justify-between">
<div class="flex flex-col gap-4">
<div class="flex items-center gap-4">
<x-ui.icon.tile>
<svg class="size-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="2" y="4" width="20" height="16" rx="2" /><path d="m2 7 9.1 6.1a1.5 1.5 0 0 0 1.8 0L22 7" />
</svg>
</x-ui.icon.tile>
<h2 class="text-xl font-semibold tracking-tight text-card-foreground">{{ __($heading) }}</h2>
</div>
<p class="max-w-prose text-sm leading-relaxed text-muted-foreground">{{ __($description) }}</p>
</div>
<div class="flex w-full flex-col gap-2 lg:max-w-md">
<form method="POST" action="{{ $action }}" class="flex w-full flex-col gap-2 sm:flex-row">
@csrf
<label for="newsletter-banner-email" class="sr-only">{{ __('Email address') }}</label>
<x-ui.input id="newsletter-banner-email" type="email" name="email" autocomplete="email" :placeholder="__($placeholder)" required class="w-full" />
<x-ui.button type="submit" variant="default" class="shrink-0">{{ __($buttonLabel) }}</x-ui.button>
</form>
<p class="text-xs text-muted-foreground">{{ __($privacy) }}</p>
</div>
</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.6 - Status
- Stable
- License
-
open - Deprecation
- Not deprecated
- Contract
-
v1 - Foundation
-
≥ 1.0.0