Skip to content
Guides
Navigation
Feedback
Overlays
Layout
Data Display
Forms
.md

Contact

contact-16

Centred locations section: two office cards, each with a map, city, address and a directions link.

Open full screen

Installation

php artisan ui:add-block contact-16

A single command installs the block's Blade file and every component it depends on. Render it in your own layout as <x-ui.blocks.contact-16 />.

Components it includes

Usage

Centred locations section: one card per office with a map, city, address and a directions link. Every piece of content is a prop. A location is ['name' => ..., 'address' => ...] plus optional 'href' (the directions link, which defaults to a Google Maps search for the address) and 'map', an embed URL. No map is embedded by default: each card shows a placeholder until you pass 'map', which renders as a lazy-loaded iframe titled with the location name.

<x-ui.blocks.contact-16
    tagline="Offices"
    heading="Where to find us"
    description="Two studios, one team."
    :locations="[
        ['name' => 'Sydney', 'address' => '1 Market St, Sydney NSW 2000', 'map' => 'https://www.openstreetmap.org/export/embed.html?bbox=151.20,-33.87,151.21,-33.86'],
        ['name' => 'Auckland', 'address' => '2 Queen St, Auckland 1010'],
    ]"
    directions-label="Get directions"
/>

Props

Every prop with its default. Pass any of them as attributes, using : to bind a PHP value.

@props([
    'tagline' => 'Tagline',
    'heading' => 'Locations',
    'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
    'locations' => [
        ['name' => 'Sydney', 'address' => '123 Sample St, Sydney NSW 2000 AU'],
        ['name' => 'New York', 'address' => '123 Sample St, New York NY 10000 USA'],
    ],
    'directionsLabel' => 'Get Directions',
])