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

Contact

contact-15

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

Open full screen

Installation

php artisan ui:add-block contact-15

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-15 />.

Components it includes

Usage

Centred locations section: one card per office with a photo, 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 'image' => ['src' => ..., 'alt' => ...]. Without an image src the card shows a placeholder.

<x-ui.blocks.contact-15
    tagline="Offices"
    heading="Where to find us"
    description="Two studios, one team."
    :locations="[
        ['name' => 'Sydney', 'address' => '1 Market St, Sydney NSW 2000', 'image' => ['src' => '/img/sydney.jpg', 'alt' => 'Sydney studio']],
        ['name' => 'Auckland', 'address' => '2 Queen St, Auckland 1010', 'image' => ['src' => '/img/auckland.jpg', 'alt' => 'Auckland studio']],
    ]"
    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',
])