Product hotspots markers — Storefront block
Freestorefront-product-hotspots-markers · for product, landing pages
Product hotspots markers
A product seen as a whole where details matter (a bag, a watch): numbered markers on one picture, the list beside it
Documentation
Installation
One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).
pnpm dlx shadcn-vue@latest add @trame/storefront-product-hotspots-markersUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontProductHotspotsMarkers from '@/components/trame/blocks/storefront/storefront-product-hotspots-markers.vue'
const props = {
eyebrow: "Why this bag",
title: "Made to last, designed to be repaired",
image: "https://images.unsplash.com/photo-1641934725990-1326a660c184?w=1600&q=80",
features: [
{
title: "Vegetable-tanned leather",
body: "Tanned with chestnut bark for six weeks: it develops a patina, it doesn’t crack.",
x: 38,
y: 42
},
{
title: "Saddle stitching",
body: "Two needles, one waxed thread: if one stitch gives, the rest holds.",
x: 62,
y: 68
}
],
closing: "Two-year warranty, parts and labor.",
actions: [
{
label: "See the warranty",
action: "page",
record: {
id: "garantie"
}
}
],
options: {
alt: "The bag seen from the front, open"
}
}
</script>
<template>
<StorefrontProductHotspotsMarkers v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa short label above the title ("Why this jacket") |
| title* | string | Wordsthe section’s title: what makes the product worth it |
| image* | string | Picturethe one picture, markers placed on it |
| features* | Feature[] | 3 to 6 features, each with a marker on the picture |
| closing | string | Wordsa closing line, a guarantee the merchant really gives |
| actions | Action[] | the buttons under the picture, each its words and page action |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Feature features[] · 4 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe selling point in a few words |
| body* | string | Wordsone or two sentences, the merchant’s own claim |
| x* | number | the marker’s place on the picture, in % from the left |
| y* | number | the marker’s place on the picture, in % from the top |
Action actions[] · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe words on the button or link |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Options options · 3 props
| Prop | Type | Description |
|---|---|---|
| pictureRatio | 'landscape' | 'square' | 'portrait' | the pictures’ frame (landscape by default) |
| alt | string | Wordsthe description of the picture |
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a band of the page that redefines the theme surfaces inside it |
What it asks your app for
The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| asset | a picture’s address as your app serves it |
| Link | your router’s link component |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your word for an interface key, or undefined to keep the block’s own |
The words it says itself, in English and French; label(key) replaces any of them:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too many attempts, try again in a moment. | Trop de tentatives, réessayez dans un moment. |
Features
- Every word in the server HTML
- Same markup in Vue and React
- Theme tokens only: every theme, light and dark
- Shows what you give it, invents nothing
- Subtle motion: one short reveal; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
actions[]
A storefront section, for product, landing pages; it uses class-variance-authority, clsx, reka-ui, tailwind-merge.
More storefront blocks
- Product finder step quiz: one question at a time with picture tiles and a progress bar: a wider range where a need decides the model.
- Product grid editorial: one large tile every few products and an optional banner cell: a catalogue that reads like a magazine page, for a short or curated list.
- Product grid rows: a dense list, one product per row with its summary and options: for large catalogues and visitors who compare facts.
- Product grid: the catalogue’s standard grid, four columns on a wide screen: every product equal, so a visitor compares quickly.
- Product information sheet drawer: Long materials, ingredients or care copy in a side panel opened from compact rows; the merchant’s own only.
- Product offer panel frequency: a product bought once or on subscription: two selectable cards, the saving as a number, a button that restates the choice.
- Product overview filmstrip: a strip of landscape pictures edge to edge, then the facts, the buy box and the description side by side: furniture and wide objects photographed in rooms.
- Product overview minimal spec: one picture, the options and a definition list of facts: a catalogue with few photos or technical goods.