Shop the Look
A "shop the look" section: a lifestyle photo with 2-3 clickable hotspot dots positioned over it, each opening a small product card with a name, price, and add button. Below the image, a bundled-products strip shows all the items with a combined bundle price.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, media-slot dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/shop-the-look.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/ecommerce/ecommerce23.tsx instead.
Usage
The file also exports ecommerce23Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Ecommerce23, ecommerce23Demo } from "@/components/blocks/ecommerce/ecommerce23"; export default function Page() { return <Ecommerce23 {...ecommerce23Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Shop the look" | Heading above the image. |
| image | MediaSlotImage | none | The lifestyle photo the hotspots are positioned over. |
| hotspots | Hotspot[] | none | The clickable dots, positioned with top/left percentages relative to the image. |
| bundlePrice | string | none | Pre-formatted combined price shown in the bundle strip, e.g. "$425.00". |
| className | string | none | Extra classes for the outer section element. |
Types
type MediaSlotImage = { src: string; alt: string }; type Hotspot = { name: string; price: string; image?: MediaSlotImage; // thumbnail in the bundle strip; falls back to a placeholder icon when omitted top: string; // CSS percentage, e.g. "22%" left: string; // CSS percentage, e.g. "42%" };
Behavior notes
- Each hotspot dot is a real button with useState tracking which single hotspot's product card is open; clicking an open dot again closes it, and clicking a different dot swaps to that one, only one card is ever open at a time.
- The pulsing ring behind each dot is a decorative CSS animation (animate-ping), not tied to any state.
- Hotspot product cards open with a fixed offset below their dot and aren't edge-aware, so a hotspot placed very close to the image's left/right edge can render its card partially clipped by the viewport on narrow screens.
- The bundle strip's "Add all to cart" button and each hotspot card's "Add" button are both inert, there's no cart in this demo.
- top and left are plain CSS percentage strings rather than numbers so they can be dropped straight into an inline style without unit conversion.
More Ecommerce Blocks
View all →wishlist-manager
Wishlist Manager
Saved-items list with stock-status badges, move-to-cart and remove actions, and a real empty state.
product-information-tabs
Product Information Tabs
Tabbed product details with Description, Features, Specifications, Reviews, and Shipping panels.
collection-showcase-grid
Collection Showcase Grid
A large featured-collection hero card alongside a grid of smaller supporting collection tiles.
shop-by-brand-grid
Shop by Brand Grid
A grid of bordered brand tiles with a wordmark-style name, product count, and a hover affordance.
sale-countdown-timer
Sale Countdown Timer
A live days/hours/minutes/seconds countdown in default, compact, or full-width banner layouts.
gift-card-redemption-form
Gift Card Redemption Form
A code-entry form that validates against a fixed list of demo gift cards and shows a real success or error state.