Product close ups loupes — Storefront block
Freestorefront-product-close-ups-loupes · for product, home pages
Product close ups loupes
Each detail in a round close-up like a magnifying glass, set in staggered balanced rows with its name and note under it, the piece itself in a card at the head: three to twelve details of a crafted piece (leather, knitwear, ceramics)
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-close-ups-loupesUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontProductCloseUpsLoupes from '@/components/trame/blocks/storefront/storefront-product-close-ups-loupes.vue'
const props = {
title: "Up close",
intro: "What you can’t see in the photo of the bag, and why we do it this way.",
product: {
id: "sacoche-cognac",
name: "Cognac leather messenger bag",
price: 24500,
image: "https://images.unsplash.com/photo-1657603738389-951c374b740c?w=480&q=80",
alt: "A cognac leather messenger bag with a shoulder strap on a light background"
},
details: [
{
image: "https://images.unsplash.com/photo-1716295177956-420a647c83ac?w=1200&q=80",
alt: "Light brown leather crossed by a seam, close-up",
label: "The saddle stitch",
note: "Two needles, a single waxed linen thread: if one stitch breaks, the seam holds."
},
{
image: "https://images.unsplash.com/photo-1637759292654-a12cb2be085e?w=1200&q=80",
alt: "Cognac brown leather, detail of a fold and a seam",
label: "The flap’s fold",
note: "Heat-folded, it always falls back into the same place."
}
]
}
</script>
<template>
<StorefrontProductCloseUpsLoupes v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title | string | Wordsthe section’s heading ("Up close") |
| intro | string | Wordsone or two lines under the heading |
| product* | Product | Datathe piece the close-ups show, as the catalogue tool answers it |
| details* | Detail[] | one to twelve close-ups of the same piece, in the order they should be read |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Product product · 7 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe record’s id in the tool that answers it |
| name* | string | Wordsthe product’s name |
| price* | number | an amount in cents |
| compareAt | number | the price before the merchant’s reduction |
| currency | string | DesignISO 4217, EUR by default |
| image | string | null | Picturethe main picture; null or absent: the product has none yet |
| alt | string | Wordswhat the main picture shows |
Detail details[] · 4 props
| Prop | Type | Description |
|---|---|---|
| image* | string | Picturea close-up of one detail of the piece |
| alt* | string | Wordswhat the close-up shows, in a sentence |
| label* | string | Wordsthe detail’s name, 1 to 4 words ("Saddle stitching") |
| note | string | Wordsone or two sentences on why it is made so, in the merchant’s words |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| 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 |
| money | formats a price, given in cents |
| 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
- Expressive motion, within its budget; still under reduced motion
- Real buttons and links, a visible focus
- Reads
productsfrom your app
A storefront section, for product, home pages; it uses @lucide/vue, @vueuse/core, clsx, motion, tailwind-merge.
More storefront blocks
- Price breakdown stacked bar: one segmented bar and its legend: 3 to 6 lines read at a glance.
- Price routes two ledgers: two short ledgers, the usual route against selling direct, ending in two totals: a brand selling direct.
- Price story figures: a short account, three or four key figures and a closing sentence, no ledger: reasons that are not only cost.
- Product compare cards above: product cards over a grouped table whose header stays in view: a large range with many attributes.
- Product compare swipe: phone-first: columns scroll sideways and snap, the attribute names pinned; chosen automatically beyond four products.
- Product compare table: two to four models side by side in a plain grid, the current one tinted: the usual comparison of a small range.
- Product configurator compact: a product page’s buy box with one or two options: a thumbnail, the choices in a row, the total and the button, no second column.
- Product configurator side by side: a made-to-order page of its own: the picture stays in view on one side while every option runs down the other, the recap at the end.