Contact
Contact sections — a split info+form (with optional icon tiles and socials), method cards, a map pairing and a compact strip.
Preview
@props([
'eyebrow' => 'Contact us',
'heading' => "Let's talk about your project",
'subheading' => 'Reach out and a member of our team will get back to you within one business day.',
'action' => '#',
'details' => null,
'socials' => null,
'icons' => true,
'responseNote' => 'We typically respond within one business day.',
])
@php
$details ??= [
['label' => 'Email', 'value' => 'hello@example.com', 'href' => 'mailto:hello@example.com', 'icon' => 'mail'],
['label' => 'Phone', 'value' => '+1 (555) 000-0000', 'href' => 'tel:+15550000000', 'icon' => 'phone'],
['label' => 'Office', 'value' => '100 Market St, Suite 200, San Francisco', 'href' => null, 'icon' => 'pin'],
];
$socials ??= [
['label' => 'X', 'href' => '#', 'icon' => 'x'],
['label' => 'GitHub', 'href' => '#', 'icon' => 'github'],
['label' => 'LinkedIn', 'href' => '#', 'icon' => 'linkedin'],
];
// Map the block's `socials` contract onto social-links: `platform` (or the older
// `icon` key / a label) picks the mark; a raw `path` becomes a custom `icon`.
$socialLinks = array_map(fn (array $s) => [
'platform' => $s['platform'] ?? (isset($s['icon']) && ! str_contains($s['icon'], '<') ? $s['icon'] : strtolower(str_replace('.', '', $s['label'] ?? 'x'))),
'label' => $s['label'] ?? null,
'href' => $s['href'] ?? '#',
'icon' => isset($s['path']) ? '<path d="'.$s['path'].'"/>' : (isset($s['icon']) && str_contains($s['icon'], '<') ? $s['icon'] : null),
], $socials);
@endphp
<x-ui.section data-slot="contact-02" space="xl" {{ $attributes }}>
<div class="mx-auto grid max-w-6xl items-start gap-12 px-4 lg:grid-cols-2">
{{-- Left: intro + details + socials --}}
<div>
@if ($eyebrow)
<p class="text-sm font-semibold uppercase tracking-wide text-primary">{{ __($eyebrow) }}</p>
@endif
<h2 @class(['text-balance text-3xl font-bold tracking-tight sm:text-4xl', 'mt-4' => $eyebrow])>{{ __($heading) }}</h2>
<p class="mt-4 max-w-md text-pretty text-lg text-muted-foreground">{{ __($subheading) }}</p>
@if ($icons)
<div class="mt-10 space-y-6">
@foreach ($details as $detail)
<div class="flex items-start gap-4">
<span class="flex size-11 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary" aria-hidden="true">
@switch($detail['icon'] ?? 'mail')
@case('phone')
<svg xmlns="http://www.w3.org/2000/svg" class="size-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.9.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92Z" />
</svg>
@break
@case('pin')
<svg xmlns="http://www.w3.org/2000/svg" class="size-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z" />
<circle cx="12" cy="10" r="3" />
</svg>
@break
@default
<svg xmlns="http://www.w3.org/2000/svg" class="size-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<rect x="2" y="4" width="20" height="16" rx="2" />
<path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" />
</svg>
@endswitch
</span>
<div class="min-w-0">
<p class="text-sm font-medium text-muted-foreground">{{ __($detail['label']) }}</p>
<div class="mt-0.5 text-sm font-medium">
@if ($detail['href'] ?? false)
<a href="{{ $detail['href'] }}" class="rounded-sm hover:text-link hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">{{ $detail['value'] }}</a>
@else
{{ $detail['value'] }}
@endif
</div>
</div>
</div>
@endforeach
</div>
@else
<dl class="mt-8 space-y-4">
@foreach ($details as $detail)
<div class="flex flex-col">
<dt class="text-sm font-medium text-muted-foreground">{{ __($detail['label']) }}</dt>
<dd class="text-sm">
@if ($detail['href'] ?? false)
<a href="{{ $detail['href'] }}" class="text-link hover:underline">{{ $detail['value'] }}</a>
@else
{{ $detail['value'] }}
@endif
</dd>
</div>
@endforeach
</dl>
@endif
@if ($icons && ! empty($socialLinks))
<x-ui.social-links :links="$socialLinks" variant="outline" shape="full" class="mt-10" />
@endif
</div>
{{-- Right: contact form --}}
<x-ui.card class="shadow-sm">
<x-ui.card.content class="pt-6">
<form method="POST" action="{{ $action }}" class="space-y-4">
@csrf
<div class="grid gap-4 sm:grid-cols-2">
<x-ui.field>
<x-ui.label for="contact-split-name" required>{{ __('Name') }}</x-ui.label>
<x-ui.input id="contact-split-name" name="name" autocomplete="name" required placeholder="{{ __('Jane Doe') }}" />
</x-ui.field>
<x-ui.field>
<x-ui.label for="contact-split-email" required>{{ __('Email') }}</x-ui.label>
<x-ui.input id="contact-split-email" type="email" name="email" autocomplete="email" required placeholder="{{ __('you@example.com') }}" />
</x-ui.field>
</div>
<x-ui.field>
<x-ui.label for="contact-split-subject">{{ __('Subject') }}</x-ui.label>
<x-ui.input id="contact-split-subject" name="subject" autocomplete="off" placeholder="{{ __('How can we help?') }}" />
</x-ui.field>
<x-ui.field>
<x-ui.label for="contact-split-message" required>{{ __('Message') }}</x-ui.label>
<x-ui.textarea id="contact-split-message" name="message" rows="5" required placeholder="{{ __('Tell us a little about what you need…') }}" />
</x-ui.field>
<x-ui.button type="submit" class="w-full">{{ __('Send message') }}</x-ui.button>
@if ($responseNote)
<p class="text-center text-sm text-muted-foreground">{{ __($responseNote) }}</p>
@endif
</form>
</x-ui.card.content>
</x-ui.card>
</div>
</x-ui.section>
Installation
php artisan ui:add blocks/contact-split
Registry contract
Install confidence
php artisan ui:add blocks/contact-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.2.2
- License
- open
- Stability
- stable
- Contract
- v1
- Foundation
- ≥ 1.0.0
| Type | Generated target |
|---|---|
| blade | resources/views/blocks/contact-split.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: Contact Split (`contact-split`)
Two-column contact section with an intro, a details list (icon-tiled rows with social links, or a plain definition list) and a card-wrapped POST form.
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/contact-split
```
## Render it
```blade
<x-blocks.contact-split icons="true" />
```
## Props
- `icons` (boolean, default `true`) (variant) — true renders icon-tiled detail rows plus social links; false renders a plain definition list with no eyebrow icons or socials.
## Use when
- Pairing a contact intro and a details list (phone, email, office, or social icon rows) with a card-wrapped POST form.
- Choosing between icon-tiled detail rows with socials or a plain definition list via the icons prop.
## Avoid when
- Use contact-cards for a card grid of contact methods, or contact-map for a form paired with a map panel instead.
## Rules
- Render the installed block with `<x-blocks.contact-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/contact-split
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/contact-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 contact intro and a details list (phone, email, office, or social icon rows) with a card-wrapped POST form.
- Choosing between icon-tiled detail rows with socials or a plain definition list via the icons prop.
Avoid when
- Use contact-cards for a card grid of contact methods, or contact-map for a form paired with a map panel instead.
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.contact-split />
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' => 'Contact us',
'heading' => "Let's talk about your project",
'subheading' => 'Reach out and a member of our team will get back to you within one business day.',
'action' => '#',
'details' => null,
'socials' => null,
'icons' => true,
'responseNote' => 'We typically respond within one business day.',
])
@php
$details ??= [
['label' => 'Email', 'value' => 'hello@example.com', 'href' => 'mailto:hello@example.com', 'icon' => 'mail'],
['label' => 'Phone', 'value' => '+1 (555) 000-0000', 'href' => 'tel:+15550000000', 'icon' => 'phone'],
['label' => 'Office', 'value' => '100 Market St, Suite 200, San Francisco', 'href' => null, 'icon' => 'pin'],
];
$socials ??= [
['label' => 'X', 'href' => '#', 'icon' => 'x'],
['label' => 'GitHub', 'href' => '#', 'icon' => 'github'],
['label' => 'LinkedIn', 'href' => '#', 'icon' => 'linkedin'],
];
// Map the block's `socials` contract onto social-links: `platform` (or the older
// `icon` key / a label) picks the mark; a raw `path` becomes a custom `icon`.
$socialLinks = array_map(fn (array $s) => [
'platform' => $s['platform'] ?? (isset($s['icon']) && ! str_contains($s['icon'], '<') ? $s['icon'] : strtolower(str_replace('.', '', $s['label'] ?? 'x'))),
'label' => $s['label'] ?? null,
'href' => $s['href'] ?? '#',
'icon' => isset($s['path']) ? '<path d="'.$s['path'].'"/>' : (isset($s['icon']) && str_contains($s['icon'], '<') ? $s['icon'] : null),
], $socials);
@endphp
<x-ui.section data-slot="contact-02" space="xl" {{ $attributes }}>
<div class="mx-auto grid max-w-6xl items-start gap-12 px-4 lg:grid-cols-2">
{{-- Left: intro + details + socials --}}
<div>
@if ($eyebrow)
<p class="text-sm font-semibold uppercase tracking-wide text-primary">{{ __($eyebrow) }}</p>
@endif
<h2 @class(['text-balance text-3xl font-bold tracking-tight sm:text-4xl', 'mt-4' => $eyebrow])>{{ __($heading) }}</h2>
<p class="mt-4 max-w-md text-pretty text-lg text-muted-foreground">{{ __($subheading) }}</p>
@if ($icons)
<div class="mt-10 space-y-6">
@foreach ($details as $detail)
<div class="flex items-start gap-4">
<span class="flex size-11 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary" aria-hidden="true">
@switch($detail['icon'] ?? 'mail')
@case('phone')
<svg xmlns="http://www.w3.org/2000/svg" class="size-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.9.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92Z" />
</svg>
@break
@case('pin')
<svg xmlns="http://www.w3.org/2000/svg" class="size-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z" />
<circle cx="12" cy="10" r="3" />
</svg>
@break
@default
<svg xmlns="http://www.w3.org/2000/svg" class="size-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<rect x="2" y="4" width="20" height="16" rx="2" />
<path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" />
</svg>
@endswitch
</span>
<div class="min-w-0">
<p class="text-sm font-medium text-muted-foreground">{{ __($detail['label']) }}</p>
<div class="mt-0.5 text-sm font-medium">
@if ($detail['href'] ?? false)
<a href="{{ $detail['href'] }}" class="rounded-sm hover:text-link hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">{{ $detail['value'] }}</a>
@else
{{ $detail['value'] }}
@endif
</div>
</div>
</div>
@endforeach
</div>
@else
<dl class="mt-8 space-y-4">
@foreach ($details as $detail)
<div class="flex flex-col">
<dt class="text-sm font-medium text-muted-foreground">{{ __($detail['label']) }}</dt>
<dd class="text-sm">
@if ($detail['href'] ?? false)
<a href="{{ $detail['href'] }}" class="text-link hover:underline">{{ $detail['value'] }}</a>
@else
{{ $detail['value'] }}
@endif
</dd>
</div>
@endforeach
</dl>
@endif
@if ($icons && ! empty($socialLinks))
<x-ui.social-links :links="$socialLinks" variant="outline" shape="full" class="mt-10" />
@endif
</div>
{{-- Right: contact form --}}
<x-ui.card class="shadow-sm">
<x-ui.card.content class="pt-6">
<form method="POST" action="{{ $action }}" class="space-y-4">
@csrf
<div class="grid gap-4 sm:grid-cols-2">
<x-ui.field>
<x-ui.label for="contact-split-name" required>{{ __('Name') }}</x-ui.label>
<x-ui.input id="contact-split-name" name="name" autocomplete="name" required placeholder="{{ __('Jane Doe') }}" />
</x-ui.field>
<x-ui.field>
<x-ui.label for="contact-split-email" required>{{ __('Email') }}</x-ui.label>
<x-ui.input id="contact-split-email" type="email" name="email" autocomplete="email" required placeholder="{{ __('you@example.com') }}" />
</x-ui.field>
</div>
<x-ui.field>
<x-ui.label for="contact-split-subject">{{ __('Subject') }}</x-ui.label>
<x-ui.input id="contact-split-subject" name="subject" autocomplete="off" placeholder="{{ __('How can we help?') }}" />
</x-ui.field>
<x-ui.field>
<x-ui.label for="contact-split-message" required>{{ __('Message') }}</x-ui.label>
<x-ui.textarea id="contact-split-message" name="message" rows="5" required placeholder="{{ __('Tell us a little about what you need…') }}" />
</x-ui.field>
<x-ui.button type="submit" class="w-full">{{ __('Send message') }}</x-ui.button>
@if ($responseNote)
<p class="text-center text-sm text-muted-foreground">{{ __($responseNote) }}</p>
@endif
</form>
</x-ui.card.content>
</x-ui.card>
</div>
</x-ui.section>
Ownership & lifecycle
Owner, release state, review evidence and adoption for this item.
- Owner
- Platform UI (@JoshJML)
- Current version
-
1.2.2 - Status
- Stable
- License
-
open - Deprecation
- Not deprecated
- Contract
-
v1 - Foundation
-
≥ 1.0.0