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

Contact

contact-17

Locations list beside a photo: pick an office from the list and its photo shows next to it. CSS only, no script.

Open full screen

Installation

php artisan ui:add-block contact-17

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

Components it includes

Usage

Locations list beside a photo. Picking an office in the list shows its photo next to it. It works with no script: each office is a visually hidden radio, so the list is keyboard friendly (Tab in, arrow keys to move) and the selected photo follows `:checked` in CSS. Every piece of content is a prop. A location is ['name' => ..., 'address' => ...] plus an optional 'image' => ['src' => ..., 'alt' => ...]; without a src the panel shows a placeholder. Give each instance on a page its own `id`.

<x-ui.blocks.contact-17
    id="offices"
    tagline="Offices"
    heading="Where to find us"
    description="Pick a studio to see it."
    :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']],
    ]"
    action-label="See the studio"
/>

Props

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

@props([
    'id' => 'contact-17',
    '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'],
        ['name' => 'London', 'address' => '123 Sample St, London W1C 1DE, United Kingdom'],
    ],
    'actionLabel' => 'View Office',
])