Product results inset grid — Storefront block

Free

storefront-product-results-inset-grid · for product, landing pages

Product results inset grid

A product with many results to show (a care, a repair, a treatment): a grid of "after" pictures, each with its "before" tucked in a corner like a print; the merchant’s own results only

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-results-inset-grid

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StorefrontProductResultsInsetGrid from '@/components/trame/blocks/storefront/storefront-product-results-inset-grid.vue'

const props = {
eyebrow: "Why this bag",
title: "Made to last, designed to be repaired",
tabs: [
{
label: "Patina",
before: "https://images.unsplash.com/photo-1755543041980-276589f8323c?w=1600&q=80",
after: "https://images.unsplash.com/photo-1778882996728-952ed23dc6f4?w=1600&q=80",
stat: "Patina noticed by 9 out of 10 customers after three months of daily use (40 people followed)"
},
{
label: "Luster",
before: "https://images.unsplash.com/photo-1755541608110-3440a0f168ed?w=1600&q=80",
after: "https://images.unsplash.com/photo-1787243293233-92f3188cde4b?w=1600&q=80",
stat: "Leather conditioned twice a year: depth of color rated 4.6/5 by the same panel"
}
],
expert: {
name: "Claire Fontan",
role: "Leatherworker, Portland workshop",
quote: "Leather cared for twice a year develops a patina without ever cracking: it’s the leather that ages best."
},
closing: "Two-year warranty, parts and labor.",
actions: [
{
label: "See the warranty",
action: "page",
record: {
id: "garantie"
}
}
],
figures: [
{
value: "9/10",
label: "customers see the patina by the third month"
},
{
value: "4.6/5",
label: "depth of color after a year of care"
}
],
options: {
pictureRatio: "landscape"
}
}
</script>

<template>
<StorefrontProductResultsInsetGrid v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
eyebrowstringWordsa short label above the title ("Why this jacket")
title*stringWordsthe section’s title: what makes the product worth it
tabs*Tab[]one per result: 2 to 4 as tabs, up to 12 in the grid
figuresFigure[]3 or 4 figures, the merchant’s own
expertExperta short quote under the tabs: a real person the merchant cites
closingstringWordsa closing line, a guarantee the merchant really gives
actionsAction[]the buttons under the results, each its words and page action
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Tab tabs[] · 4 props
PropTypeDescription
label*stringWordswhat the tab says ("Patina", "Radiance")
before*stringPicturethe “before” picture of the pair
after*stringPicturethe “after” picture, same frame
stat*stringWordswhat the pair shows, measured and dated as the merchant states it ("+38% perceived radiance after 4 weeks, panel of 40 people")
Figure figures[] · 2 props
PropTypeDescription
value*stringWordsa real figure the merchant gave ("2 years", "98%")
label*stringWordswhat it measures
Expert expert · 3 props
PropTypeDescription
name*stringWordsthe expert’s name
role*stringWordstheir role ("Leather craftswoman")
quote*stringWordstheir words, one or two sentences
Action actions[] · 3 props
PropTypeDescription
label*stringWordsthe words on the button or link
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Options options · 4 props
PropTypeDescription
pictureRatio'landscape' | 'square' | 'portrait'the pictures’ frame (landscape by default)
beforeLabelstringWords("Before")
afterLabelstringWords("After")
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
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
  • 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 quick view split dialog: a centred dialog, the picture on the left and the choices on the right: desktop catalogues where the list stays in view behind.
  • Product rail aside: the heading, arrows and "See all" held in a narrow column on the left and the numbered rail running from it to the edge of the screen: a calm, editorial row for a home page with room to breathe.
  • Product rail peek: one large card and the next ones peeking in from the edge: a featured selection that draws the eye to one product.
  • Product rail poster: tall poster cards, the picture filling each one: its number and kind (category) at the top, the merchant’s tag at the top right, the name, summary and price over a scrim at the foot, a "Quick add" button that rises on hover and focus, arrows and a thin line showing how far the row has scrolled: a dark editorial band of a few signature pieces (a jeweller, an atelier, a gallery shop).
  • Product rail: a scrolling row of product cards with prev/next arrows and a "See all" link: a section on the home page or at the end of a catalogue.
  • Product routine numbered: a routine or a kit told step by step, each step pointing to the product it uses: beauty, care, DIY.
  • Product selection carousel: large story cards in a scrolling row: a longer list of featured products, with the merchant’s line on each; the merchant’s own products and figures only.
  • Product selection expandable: three to six products staged as tall panels, the one under the pointer widening: a few pieces, strong pictures; the merchant’s own products and figures only.

All 409 storefront blocks