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',
'heading' => 'Visit our studio',
'subheading' => "Tell us what you're building and we'll get back to you within one business day.",
'action' => '#',
'address' => '100 Market Street, Suite 200',
'addressLine2' => 'San Francisco, CA 94105',
'directionsHref' => '#',
])
<x-ui.section space="xl" {{ $attributes }}>
<x-ui.container gutter="sm">
<div class="max-w-2xl">
@if ($eyebrow)
<p class="text-sm font-medium uppercase tracking-wide text-primary">{{ __($eyebrow) }}</p>
@endif
<h2 class="mt-4 text-3xl font-bold tracking-tight sm:text-4xl">{{ __($heading) }}</h2>
<p class="mt-4 text-lg text-muted-foreground">{{ __($subheading) }}</p>
</div>
<div class="mt-10 grid gap-8 lg:grid-cols-2">
<x-ui.card>
<x-ui.card.content class="pt-6">
<form method="POST" action="{{ $action }}" class="space-y-4">
@csrf
<x-ui.field>
<x-ui.label for="contact-map-name" required>{{ __('Name') }}</x-ui.label>
<x-ui.input id="contact-map-name" name="name" autocomplete="name" required placeholder="{{ __('Jane Doe') }}" />
</x-ui.field>
<x-ui.field>
<x-ui.label for="contact-map-email" required>{{ __('Email') }}</x-ui.label>
<x-ui.input id="contact-map-email" type="email" name="email" autocomplete="email" required placeholder="{{ __('you@example.com') }}" />
</x-ui.field>
<x-ui.field>
<x-ui.label for="contact-map-message" required>{{ __('Message') }}</x-ui.label>
<x-ui.textarea id="contact-map-message" name="message" rows="5" required placeholder="{{ __('How can we help?') }}" />
</x-ui.field>
<x-ui.button type="submit" class="w-full sm:w-auto">{{ __('Send message') }}</x-ui.button>
</form>
</x-ui.card.content>
</x-ui.card>
<figure class="relative min-h-[20rem] overflow-hidden rounded-lg border border-border shadow-sm lg:min-h-0">
<div class="absolute inset-0 bg-gradient-to-br from-primary/10 via-muted to-background"></div>
<x-ui.grid-pattern :gap="40" class="text-border/60 opacity-70" />
<div class="absolute inset-0 flex items-center justify-center">
<span class="relative flex h-12 w-12 items-center justify-center">
<span class="absolute inline-flex h-full w-full motion-safe:animate-ping rounded-full bg-primary/30"></span>
<span class="relative inline-flex h-10 w-10 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-md">
<svg class="h-5 w-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<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>
</span>
</span>
</div>
<figcaption class="absolute bottom-4 start-4 end-4 sm:end-auto sm:max-w-xs">
<div class="rounded-lg border border-border bg-card/95 p-6 text-card-foreground shadow-md backdrop-blur">
<div class="flex items-start gap-4">
<span class="mt-0.5 flex h-8 w-8 flex-none items-center justify-center rounded-md bg-primary/10 text-primary">
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<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>
</span>
<div class="min-w-0">
<p class="text-sm font-semibold">{{ __($address) }}</p>
<p class="text-sm text-muted-foreground">{{ __($addressLine2) }}</p>
@if ($directionsHref)
<a href="{{ $directionsHref }}" class="mt-2 inline-flex items-center gap-2 text-sm font-medium text-link hover:underline">
{{ __('Get directions') }}
<svg class="h-4 w-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">
<path d="M5 12h14" />
<path d="m12 5 7 7-7 7" />
</svg>
</a>
@endif
</div>
</div>
</div>
</figcaption>
</figure>
</div>
</x-ui.container>
</x-ui.section>
Installation
php artisan ui:add blocks/contact-map
Registry contract
Install confidence
php artisan ui:add blocks/contact-map
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/contact-map.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 Map (`contact-map`)
Editorial two-column contact section pairing a POST contact form in a card with a faux gridded map panel, pin marker, and an overlaid address chip.
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-map
```
## Render it
```blade
<x-blocks.contact-map />
```
## Props
- `eyebrow` (string, default `Contact`)
- `heading` (string, default `Visit our studio`)
- `subheading` (string, default `Tell us what you're building and we'll get back to you within one business day.`)
- `action` (string, default `#`)
- `address` (string, default `100 Market Street, Suite 200`)
- `address-line2` (string, default `San Francisco, CA 94105`)
- `directions-href` (string, default `#`)
## Use when
- Pairing a POST contact form with a faux gridded map panel and an overlaid address chip to show a physical location.
- Anchoring a studio or office contact section with a visual sense of place alongside the form.
## Avoid when
- Use contact-split for a form paired with a details list instead of a map, if there is no physical location to show.
## Rules
- Render the installed block with `<x-blocks.contact-map />` 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-map
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/contact-map.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 POST contact form with a faux gridded map panel and an overlaid address chip to show a physical location.
- Anchoring a studio or office contact section with a visual sense of place alongside the form.
Avoid when
- Use contact-split for a form paired with a details list instead of a map, if there is no physical location to show.
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-map />
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',
'heading' => 'Visit our studio',
'subheading' => "Tell us what you're building and we'll get back to you within one business day.",
'action' => '#',
'address' => '100 Market Street, Suite 200',
'addressLine2' => 'San Francisco, CA 94105',
'directionsHref' => '#',
])
<x-ui.section space="xl" {{ $attributes }}>
<x-ui.container gutter="sm">
<div class="max-w-2xl">
@if ($eyebrow)
<p class="text-sm font-medium uppercase tracking-wide text-primary">{{ __($eyebrow) }}</p>
@endif
<h2 class="mt-4 text-3xl font-bold tracking-tight sm:text-4xl">{{ __($heading) }}</h2>
<p class="mt-4 text-lg text-muted-foreground">{{ __($subheading) }}</p>
</div>
<div class="mt-10 grid gap-8 lg:grid-cols-2">
<x-ui.card>
<x-ui.card.content class="pt-6">
<form method="POST" action="{{ $action }}" class="space-y-4">
@csrf
<x-ui.field>
<x-ui.label for="contact-map-name" required>{{ __('Name') }}</x-ui.label>
<x-ui.input id="contact-map-name" name="name" autocomplete="name" required placeholder="{{ __('Jane Doe') }}" />
</x-ui.field>
<x-ui.field>
<x-ui.label for="contact-map-email" required>{{ __('Email') }}</x-ui.label>
<x-ui.input id="contact-map-email" type="email" name="email" autocomplete="email" required placeholder="{{ __('you@example.com') }}" />
</x-ui.field>
<x-ui.field>
<x-ui.label for="contact-map-message" required>{{ __('Message') }}</x-ui.label>
<x-ui.textarea id="contact-map-message" name="message" rows="5" required placeholder="{{ __('How can we help?') }}" />
</x-ui.field>
<x-ui.button type="submit" class="w-full sm:w-auto">{{ __('Send message') }}</x-ui.button>
</form>
</x-ui.card.content>
</x-ui.card>
<figure class="relative min-h-[20rem] overflow-hidden rounded-lg border border-border shadow-sm lg:min-h-0">
<div class="absolute inset-0 bg-gradient-to-br from-primary/10 via-muted to-background"></div>
<x-ui.grid-pattern :gap="40" class="text-border/60 opacity-70" />
<div class="absolute inset-0 flex items-center justify-center">
<span class="relative flex h-12 w-12 items-center justify-center">
<span class="absolute inline-flex h-full w-full motion-safe:animate-ping rounded-full bg-primary/30"></span>
<span class="relative inline-flex h-10 w-10 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-md">
<svg class="h-5 w-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<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>
</span>
</span>
</div>
<figcaption class="absolute bottom-4 start-4 end-4 sm:end-auto sm:max-w-xs">
<div class="rounded-lg border border-border bg-card/95 p-6 text-card-foreground shadow-md backdrop-blur">
<div class="flex items-start gap-4">
<span class="mt-0.5 flex h-8 w-8 flex-none items-center justify-center rounded-md bg-primary/10 text-primary">
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<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>
</span>
<div class="min-w-0">
<p class="text-sm font-semibold">{{ __($address) }}</p>
<p class="text-sm text-muted-foreground">{{ __($addressLine2) }}</p>
@if ($directionsHref)
<a href="{{ $directionsHref }}" class="mt-2 inline-flex items-center gap-2 text-sm font-medium text-link hover:underline">
{{ __('Get directions') }}
<svg class="h-4 w-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">
<path d="M5 12h14" />
<path d="m12 5 7 7-7 7" />
</svg>
</a>
@endif
</div>
</div>
</div>
</figcaption>
</figure>
</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