Contact
Contact sections — a split info+form (with optional icon tiles and socials), method cards, a map pairing and a compact strip.
Preview
@props([
'phoneLabel' => 'Phone',
'phone' => '+1 (555) 000-0000',
'phoneHref' => 'tel:+15550000000',
'emailLabel' => 'Email',
'email' => 'hello@example.com',
'emailHref' => 'mailto:hello@example.com',
'officeLabel' => 'Office',
'office' => '100 Market St, San Francisco',
'officeHref' => null,
'cta' => 'Get in touch',
'ctaHref' => '#',
])
@php
$items = [
[
'label' => $phoneLabel,
'value' => $phone,
'href' => $phoneHref,
'icon' => 'M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z',
],
[
'label' => $emailLabel,
'value' => $email,
'href' => $emailHref,
'icon' => 'M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75',
],
[
'label' => $officeLabel,
'value' => $office,
'href' => $officeHref,
'icon' => 'M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z',
],
];
@endphp
<section {{ $attributes->merge(['class' => 'bg-background py-10 text-foreground']) }}>
<div class="mx-auto max-w-5xl px-4">
<div class="flex flex-col gap-6 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm lg:flex-row lg:items-center lg:gap-2 lg:p-4 lg:ps-6">
@foreach ($items as $i => $item)
@if ($i > 0)
<x-ui.separator class="lg:hidden" />
<x-ui.separator orientation="vertical" class="hidden self-stretch lg:block" />
@endif
<div class="flex min-w-0 flex-1 items-center gap-4">
<span class="flex size-10 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground" aria-hidden="true">
<svg class="size-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<path d="{{ $item['icon'] }}" />
</svg>
</span>
<div class="min-w-0">
<p class="text-xs font-medium uppercase tracking-wide text-muted-foreground">{{ __($item['label']) }}</p>
@if ($item['href'] ?? false)
<a href="{{ $item['href'] }}" class="block truncate text-sm font-medium text-foreground hover:text-link focus-visible:text-link focus-visible:outline-none">{{ $item['value'] }}</a>
@else
<p class="truncate text-sm font-medium text-foreground">{{ $item['value'] }}</p>
@endif
</div>
</div>
@endforeach
<div class="shrink-0 lg:ms-2">
<x-ui.button :href="$ctaHref" class="w-full lg:w-auto block">{{ __($cta) }}</x-ui.button>
</div>
</div>
</div>
</section>
Installation
php artisan ui:add blocks/contact-compact
Registry contract
Install confidence
php artisan ui:add blocks/contact-compact
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-compact.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 Compact (`contact-compact`)
A compact horizontal contact strip in a bordered card with inline phone, email, and office items separated by vertical dividers and a primary call-to-action button, stacking on mobile.
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-compact
```
## Render it
```blade
<x-blocks.contact-compact />
```
## Props
- `phone-label` (string, default `Phone`)
- `phone` (string, default `+1 (555) 000-0000`)
- `phone-href` (string, default `tel:+15550000000`)
- `email-label` (string, default `Email`)
- `email` (string, default `[email protected]`)
- `email-href` (string, default `mailto:[email protected]`)
- `office-label` (string, default `Office`)
- `office` (string, default `100 Market St, San Francisco`)
- `office-href` (mixed|null, default `null`)
- `cta` (string, default `Get in touch`)
- `cta-href` (string, default `#`)
## Use when
- Showing phone, email and office details as a compact horizontal strip in a bordered card with a single CTA button.
- Stacking the items vertically on mobile while keeping the strip inline on wider screens.
## Avoid when
- Use contact-cards for a full card grid of contact methods, or contact-split/contact-editorial if a form is also needed.
## Rules
- Render the installed block with `<x-blocks.contact-compact />` 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-compact
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/contact-compact.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
- Showing phone, email and office details as a compact horizontal strip in a bordered card with a single CTA button.
- Stacking the items vertically on mobile while keeping the strip inline on wider screens.
Avoid when
- Use contact-cards for a full card grid of contact methods, or contact-split/contact-editorial if a form is also needed.
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-compact />
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([
'phoneLabel' => 'Phone',
'phone' => '+1 (555) 000-0000',
'phoneHref' => 'tel:+15550000000',
'emailLabel' => 'Email',
'email' => 'hello@example.com',
'emailHref' => 'mailto:hello@example.com',
'officeLabel' => 'Office',
'office' => '100 Market St, San Francisco',
'officeHref' => null,
'cta' => 'Get in touch',
'ctaHref' => '#',
])
@php
$items = [
[
'label' => $phoneLabel,
'value' => $phone,
'href' => $phoneHref,
'icon' => 'M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z',
],
[
'label' => $emailLabel,
'value' => $email,
'href' => $emailHref,
'icon' => 'M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75',
],
[
'label' => $officeLabel,
'value' => $office,
'href' => $officeHref,
'icon' => 'M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z',
],
];
@endphp
<section {{ $attributes->merge(['class' => 'bg-background py-10 text-foreground']) }}>
<div class="mx-auto max-w-5xl px-4">
<div class="flex flex-col gap-6 rounded-lg border border-border bg-card p-6 text-card-foreground shadow-sm lg:flex-row lg:items-center lg:gap-2 lg:p-4 lg:ps-6">
@foreach ($items as $i => $item)
@if ($i > 0)
<x-ui.separator class="lg:hidden" />
<x-ui.separator orientation="vertical" class="hidden self-stretch lg:block" />
@endif
<div class="flex min-w-0 flex-1 items-center gap-4">
<span class="flex size-10 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground" aria-hidden="true">
<svg class="size-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<path d="{{ $item['icon'] }}" />
</svg>
</span>
<div class="min-w-0">
<p class="text-xs font-medium uppercase tracking-wide text-muted-foreground">{{ __($item['label']) }}</p>
@if ($item['href'] ?? false)
<a href="{{ $item['href'] }}" class="block truncate text-sm font-medium text-foreground hover:text-link focus-visible:text-link focus-visible:outline-none">{{ $item['value'] }}</a>
@else
<p class="truncate text-sm font-medium text-foreground">{{ $item['value'] }}</p>
@endif
</div>
</div>
@endforeach
<div class="shrink-0 lg:ms-2">
<x-ui.button :href="$ctaHref" class="w-full lg:w-auto block">{{ __($cta) }}</x-ui.button>
</div>
</div>
</div>
</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