Shop the Look
Shoppable lifestyle imagery — hotspot pins on a photo that reveal product popovers.
Preview
@props([
'heading' => 'Shop the look',
'subheading' => 'Tap a dot on the image to explore each piece, then add your favourites to the cart.',
'image' => null,
'products' => null,
'currency' => 'USD',
])
@php
$products ??= [
[
'title' => 'Oversized wool coat',
'price' => '248',
'image' => null,
'x' => '34%',
'y' => '30%',
],
[
'title' => 'Ribbed knit sweater',
'price' => '96',
'image' => null,
'x' => '52%',
'y' => '52%',
],
[
'title' => 'Leather crossbody bag',
'price' => '179',
'image' => null,
'x' => '68%',
'y' => '64%',
],
[
'title' => 'Tapered trousers',
'price' => '118',
'image' => null,
'x' => '46%',
'y' => '82%',
],
];
@endphp
<x-ui.section
data-slot="shop-the-look-01"
space="lg" {{ $attributes }}
>
<x-ui.container gutter="sm">
<div class="mx-auto max-w-2xl text-center">
<h2 class="text-pretty text-2xl font-semibold tracking-tight sm:text-3xl">{{ __($heading) }}</h2>
<p class="mt-4 text-pretty text-sm leading-relaxed text-muted-foreground sm:text-base">{{ __($subheading) }}</p>
</div>
<div class="mt-10 grid grid-cols-1 gap-8 lg:grid-cols-[1fr_22rem] lg:items-start">
{{-- Lifestyle image with interactive hotspots --}}
<div
x-data="{ active: null }"
class="relative overflow-hidden rounded-lg border border-border bg-muted"
>
<div class="aspect-[4/5] w-full">
@if ($image)
<img
src="{{ $image }}"
alt="{{ __('Lifestyle photo of the featured outfit') }}"
class="size-full object-cover"
/>
@else
<div
role="img"
aria-label="{{ __('Lifestyle photo of the featured outfit') }}"
class="flex size-full items-center justify-center text-muted-foreground"
>
<svg class="size-16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="3" y="3" width="18" height="18" rx="2" />
<circle cx="9" cy="9" r="2" />
<path d="m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21" />
</svg>
</div>
@endif
</div>
{{-- Hotspot pins + popovers --}}
@foreach ($products as $product)
<div
class="absolute -translate-x-1/2 -translate-y-1/2"
style="inset-inline-start: {{ $product['x'] }}; top: {{ $product['y'] }}"
>
<button
type="button"
x-on:click="active = active === {{ $loop->index }} ? null : {{ $loop->index }}"
:class="active === {{ $loop->index }} ? 'bg-primary text-primary-foreground' : 'bg-background text-foreground'"
class="relative flex size-7 items-center justify-center rounded-full border border-border shadow-md ring-ring transition focus-visible:outline-none focus-visible:ring-2"
:aria-expanded="active === {{ $loop->index }}"
aria-label="{{ __('View :title', ['title' => __($product['title'])]) }}"
>
<span class="absolute inline-flex size-full animate-ping rounded-full bg-primary/40 motion-reduce:animate-none" aria-hidden="true"></span>
<svg class="relative size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12 5v14" />
<path d="M5 12h14" />
</svg>
</button>
{{-- Product popover --}}
<div
x-show="active === {{ $loop->index }}"
x-transition
x-cloak
class="absolute top-full z-10 mt-4 w-60 -translate-x-1/2"
style="inset-inline-start: 50%"
>
<x-ui.card class="overflow-hidden p-4 shadow-xl">
<div class="flex items-center gap-4">
<span class="flex size-14 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground">
@if ($product['image'])
<img src="{{ $product['image'] }}" alt="{{ __($product['title']) }}" class="size-full rounded-lg object-cover" />
@else
<svg class="size-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z" />
<path d="M3 6h18" />
<path d="M16 10a4 4 0 0 1-8 0" />
</svg>
@endif
</span>
<div class="min-w-0">
<h3 class="truncate text-sm font-semibold tracking-tight text-foreground">{{ __($product['title']) }}</h3>
<x-ui.price :amount="$product['price']" :currency="$currency" size="sm" class="mt-0.5" />
</div>
</div>
<div class="mt-4 flex items-center gap-2">
<x-ui.button size="sm" class="flex-1">{{ __('Add to cart') }}</x-ui.button>
<x-ui.button variant="outline" size="sm" class="flex-1">{{ __('View') }}</x-ui.button>
</div>
</x-ui.card>
</div>
</div>
@endforeach
</div>
{{-- Product list — usable without hover, primary on mobile --}}
<div>
<h3 class="text-sm font-semibold uppercase tracking-wide text-muted-foreground">{{ __('In this look') }}</h3>
<ul role="list" class="mt-4 flex flex-col gap-4">
@foreach ($products as $product)
@php
$card = [
'name' => $product['title'],
'href' => $product['href'] ?? '#',
'price' => $product['price'],
'image' => $product['image'] ?? null,
];
@endphp
<li>
<x-ui.product-card :product="$card" layout="compact" :currency="$currency" :show-wishlist="false">
<x-slot:actions>
<x-ui.badge variant="secondary">{{ $loop->iteration }}</x-ui.badge>
<x-ui.button size="sm" variant="outline" :aria-label="__('Add :title to cart', ['title' => __($product['title'])])">{{ __('Add') }}</x-ui.button>
</x-slot:actions>
</x-ui.product-card>
</li>
@endforeach
</ul>
</div>
</div>
</x-ui.container>
</x-ui.section>
Installation
php artisan ui:add blocks/shop-the-look-hotspots
Registry contract
Install confidence
php artisan ui:add blocks/shop-the-look-hotspots
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.1.2
- License
- open
- Stability
- stable
- Contract
- v1
- Foundation
- ≥ 1.0.0
| Type | Generated target |
|---|---|
| blade | resources/views/blocks/shop-the-look-hotspots.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: Shop The Look (`shop-the-look-hotspots`)
An ecommerce shop-the-look section with a heading and subheading above a large lifestyle product image, overlaid with interactive hotspot pins whose animated halos open a small product popover card showing a thumbnail, title, price, and add-to-cart and view buttons, plus a hover-free product list rendered as cards alongside for 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/shop-the-look-hotspots
```
## Render it
```blade
<x-blocks.shop-the-look-hotspots />
```
## Props
- `heading` (string, default `Shop the look`) — Section heading.
- `subheading` (string, default `Tap a dot on the image to explore each piece, then add your favourites to the cart.`) — Supporting copy under the heading.
- `image` (mixed|null, default `null`) — Lifestyle image source; null renders a token placeholder.
- `products` (mixed|null, default `null`) — Tagged products, each with a title, price and pin position; null falls back to sample data.
- `currency` (string, default `USD`) — Currency symbol or code used to format prices.
## Use when
- Letting shoppers explore products tagged on a single lifestyle photo through interactive hotspot pins that open a product popover.
- Wanting one hero image to carry the whole outfit or scene, with a fallback product list for mobile.
## Avoid when
- Showing multiple lifestyle scenes in a gallery instead of one image; use shop-the-look-lookbook instead.
## Rules
- Render the installed block with `<x-blocks.shop-the-look-hotspots />` 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/shop-the-look-hotspots
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/shop-the-look-hotspots.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
- Letting shoppers explore products tagged on a single lifestyle photo through interactive hotspot pins that open a product popover.
- Wanting one hero image to carry the whole outfit or scene, with a fallback product list for mobile.
Avoid when
- Showing multiple lifestyle scenes in a gallery instead of one image; use shop-the-look-lookbook instead.
Anti-patterns
- Do not replace semantic props with conflicting utility classes.
- Do not remove labels, focus styles, or state attributes.
- Anatomy
Usage
Render the block as a component, passing data where useful:
<x-blocks.shop-the-look-hotspots />
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([
'heading' => 'Shop the look',
'subheading' => 'Tap a dot on the image to explore each piece, then add your favourites to the cart.',
'image' => null,
'products' => null,
'currency' => 'USD',
])
@php
$products ??= [
[
'title' => 'Oversized wool coat',
'price' => '248',
'image' => null,
'x' => '34%',
'y' => '30%',
],
[
'title' => 'Ribbed knit sweater',
'price' => '96',
'image' => null,
'x' => '52%',
'y' => '52%',
],
[
'title' => 'Leather crossbody bag',
'price' => '179',
'image' => null,
'x' => '68%',
'y' => '64%',
],
[
'title' => 'Tapered trousers',
'price' => '118',
'image' => null,
'x' => '46%',
'y' => '82%',
],
];
@endphp
<x-ui.section
data-slot="shop-the-look-01"
space="lg" {{ $attributes }}
>
<x-ui.container gutter="sm">
<div class="mx-auto max-w-2xl text-center">
<h2 class="text-pretty text-2xl font-semibold tracking-tight sm:text-3xl">{{ __($heading) }}</h2>
<p class="mt-4 text-pretty text-sm leading-relaxed text-muted-foreground sm:text-base">{{ __($subheading) }}</p>
</div>
<div class="mt-10 grid grid-cols-1 gap-8 lg:grid-cols-[1fr_22rem] lg:items-start">
{{-- Lifestyle image with interactive hotspots --}}
<div
x-data="{ active: null }"
class="relative overflow-hidden rounded-lg border border-border bg-muted"
>
<div class="aspect-[4/5] w-full">
@if ($image)
<img
src="{{ $image }}"
alt="{{ __('Lifestyle photo of the featured outfit') }}"
class="size-full object-cover"
/>
@else
<div
role="img"
aria-label="{{ __('Lifestyle photo of the featured outfit') }}"
class="flex size-full items-center justify-center text-muted-foreground"
>
<svg class="size-16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="3" y="3" width="18" height="18" rx="2" />
<circle cx="9" cy="9" r="2" />
<path d="m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21" />
</svg>
</div>
@endif
</div>
{{-- Hotspot pins + popovers --}}
@foreach ($products as $product)
<div
class="absolute -translate-x-1/2 -translate-y-1/2"
style="inset-inline-start: {{ $product['x'] }}; top: {{ $product['y'] }}"
>
<button
type="button"
x-on:click="active = active === {{ $loop->index }} ? null : {{ $loop->index }}"
:class="active === {{ $loop->index }} ? 'bg-primary text-primary-foreground' : 'bg-background text-foreground'"
class="relative flex size-7 items-center justify-center rounded-full border border-border shadow-md ring-ring transition focus-visible:outline-none focus-visible:ring-2"
:aria-expanded="active === {{ $loop->index }}"
aria-label="{{ __('View :title', ['title' => __($product['title'])]) }}"
>
<span class="absolute inline-flex size-full animate-ping rounded-full bg-primary/40 motion-reduce:animate-none" aria-hidden="true"></span>
<svg class="relative size-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12 5v14" />
<path d="M5 12h14" />
</svg>
</button>
{{-- Product popover --}}
<div
x-show="active === {{ $loop->index }}"
x-transition
x-cloak
class="absolute top-full z-10 mt-4 w-60 -translate-x-1/2"
style="inset-inline-start: 50%"
>
<x-ui.card class="overflow-hidden p-4 shadow-xl">
<div class="flex items-center gap-4">
<span class="flex size-14 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground">
@if ($product['image'])
<img src="{{ $product['image'] }}" alt="{{ __($product['title']) }}" class="size-full rounded-lg object-cover" />
@else
<svg class="size-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z" />
<path d="M3 6h18" />
<path d="M16 10a4 4 0 0 1-8 0" />
</svg>
@endif
</span>
<div class="min-w-0">
<h3 class="truncate text-sm font-semibold tracking-tight text-foreground">{{ __($product['title']) }}</h3>
<x-ui.price :amount="$product['price']" :currency="$currency" size="sm" class="mt-0.5" />
</div>
</div>
<div class="mt-4 flex items-center gap-2">
<x-ui.button size="sm" class="flex-1">{{ __('Add to cart') }}</x-ui.button>
<x-ui.button variant="outline" size="sm" class="flex-1">{{ __('View') }}</x-ui.button>
</div>
</x-ui.card>
</div>
</div>
@endforeach
</div>
{{-- Product list — usable without hover, primary on mobile --}}
<div>
<h3 class="text-sm font-semibold uppercase tracking-wide text-muted-foreground">{{ __('In this look') }}</h3>
<ul role="list" class="mt-4 flex flex-col gap-4">
@foreach ($products as $product)
@php
$card = [
'name' => $product['title'],
'href' => $product['href'] ?? '#',
'price' => $product['price'],
'image' => $product['image'] ?? null,
];
@endphp
<li>
<x-ui.product-card :product="$card" layout="compact" :currency="$currency" :show-wishlist="false">
<x-slot:actions>
<x-ui.badge variant="secondary">{{ $loop->iteration }}</x-ui.badge>
<x-ui.button size="sm" variant="outline" :aria-label="__('Add :title to cart', ['title' => __($product['title'])])">{{ __('Add') }}</x-ui.button>
</x-slot:actions>
</x-ui.product-card>
</li>
@endforeach
</ul>
</div>
</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.1.2 - Status
- Stable
- License
-
open - Deprecation
- Not deprecated
- Contract
-
v1 - Foundation
-
≥ 1.0.0