Product close ups loupes — Storefront block

Free

storefront-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-loupes

Usage

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.

PropTypeDescription
titlestringWordsthe section’s heading ("Up close")
introstringWordsone or two lines under the heading
product*ProductDatathe 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
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Product product · 7 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
name*stringWordsthe product’s name
price*numberan amount in cents
compareAtnumberthe price before the merchant’s reduction
currencystringDesignISO 4217, EUR by default
imagestring | nullPicturethe main picture; null or absent: the product has none yet
altstringWordswhat the main picture shows
Detail details[] · 4 props
PropTypeDescription
image*stringPicturea close-up of one detail of the piece
alt*stringWordswhat the close-up shows, in a sentence
label*stringWordsthe detail’s name, 1 to 4 words ("Saddle stitching")
notestringWordsone or two sentences on why it is made so, in the merchant’s words
Options options · 1 props
PropTypeDescription
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa 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).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
moneyformats a price, given in cents
asseta picture’s address as your app serves it
Linkyour router’s link component
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour 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:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo 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 products from 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.

All 409 storefront blocks