Product facets radial — Storefront block

Pro

storefront-product-facets-radial · for home, product, landing pages

Product facets radial

One product with 3 to 6 named facets around its picture: a single object seen from several sides

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-facets-radial

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StorefrontProductFacetsRadial from '@/components/trame/blocks/storefront/storefront-product-facets-radial.vue'

const props = {
title: "The Atelier bag, piece by piece",
intro: "One model, handmade in our workshop: here is what goes into it.",
media: "https://images.unsplash.com/photo-1657603738389-951c374b740c?w=1600&q=80",
alt: "A cognac leather shoulder bag on a light background",
items: [
{
title: "Vegetable-tanned leather",
text: "Tanned in the USA without chrome, it develops a patina over the years.",
icon: "leaf",
media: "https://images.unsplash.com/photo-1716295177956-420a647c83ac?w=1600&q=80",
alt: "Close-up of tanned leather"
},
{
title: "Saddle stitching",
text: "Two needles and waxed thread: a seam that won’t come undone.",
icon: "ruler",
media: "https://images.unsplash.com/photo-1568288796918-03e7d93306bd?w=1600&q=80",
alt: "A seam sewn by hand"
}
],
cta: {
label: "See the bag",
action: "product",
record: {
id: "atelier"
}
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe section’s title, an h2
introstringWordsone or two sentences under the title
mediastringPicturethe flagship object, ideally a clean or cut-out picture, the merchant’s own
altstringWordswhat the picture shows
items*Item[]the items shown, in order
ctaCtathe call to action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Item items[] · 5 props
PropTypeDescription
title*stringWordsthe facet, audience or promise, in a few words
textstringWordsone sentence
iconstringDesigna pictogram (leaf, ruler, shield, sparkles, truck, heart, recycle, hand, star, clock, package, sun)
mediastringPicturea picture or illustration for it, supplied by the merchant
altstringWordswhat that picture shows
Cta cta · 3 props
PropTypeDescription
label*stringWordswhat happens ("See the product")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
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
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
  • Asks your app through actions: cta

A storefront section, for home, product, landing pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.

More storefront blocks

  • 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.
  • Product dimensions diagram: A dimension drawing with exact measurements, enlarged in a dialog with an all-media tab; the merchant’s own only.
  • Product features accordion picture: a few features that each deserve a sentence: a picture beside an accordion, the picture following the open panel.
  • Product features alternating: the usual story of a product: a picture and a selling point per row, sides swapping each time.
  • Product features figures: a product with real numbers to show (years of warranty, tests passed): the figures first, then the features in rows.
  • Product features tabs: many features that fall into themes (matter, use, care): one tab per theme, picture cards inside.

All 409 storefront blocks