Material shelf glossary link — Storefront block

Pro

storefront-material-shelf-glossary-link · for home, product, landing pages

Material shelf glossary link

Each material a row leading to its own entry page: a shop with an ingredients library

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-material-shelf-glossary-link

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StorefrontMaterialShelfGlossaryLink from '@/components/trame/blocks/storefront/storefront-material-shelf-glossary-link.vue'

const props = {
title: "What our pieces are made of",
intro: "Seven materials, each chosen for what it brings to everyday use, and found from one collection to the next.",
items: [
{
name: "Washed linen",
image: "https://images.unsplash.com/photo-1528458909336-e7a0adfed0a5?w=900&q=80",
alt: "A close-up of beige linen cloth",
line: "Washed by the bolt before sewing, it is soft from day one and only gets softer with time.",
detailAction: "material"
},
{
name: "Undyed wool",
image: "https://images.unsplash.com/photo-1670764732222-e787bccd934f?w=900&q=80",
alt: "A skein of undyed wool",
line: "Spun without dye, it keeps the color of the fleece and its slightly rustic feel.",
detailAction: "material"
}
],
options: {
eyebrow: "Materials"
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe title ("What our pieces are made of")
introstringWordsone sentence on why these materials, as the merchant says it
items*Item[]the items shown, in order
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Item items[] · 6 props
PropTypeDescription
name*stringWordsthe material, ingredient or component ("Washed linen", "Beeswax")
imagestringPicturea picture of the material itself
altstringWordswhat the picture shows, when the name does not say it
line*stringWordsone line on why the merchant uses it, in the merchant’s own words: no claim the merchant did not make
detailActionstringActionthe page action of the material’s entry page ("glossary-link"); it receives `{ id }`
idstringDesignwhat the entry page is looked up by; the name when absent
Options options · 2 props
PropTypeDescription
eyebrowstringWordsa short line above the title ("Materials")
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: items[].detailAction

A storefront section, for home, product, landing pages; it uses @lucide/vue, @vueuse/core, clsx, motion, tailwind-merge.

More storefront blocks

  • Lookbook cover wide cover: a wide cover picture under the title and two buttons, a strip of credits below: the opening of a season’s lookbook.
  • Lookbook cover: the first frame as a wide magazine cover with the title and the link on its foot, the other frames as a numbered contact sheet with their captions and notes: a full shoot with one picture strong enough to open it.
  • Lookbook pinboard: taped prints slightly rotated on a board that straighten under the pointer, with their caption and note: a casual, handmade lookbook or team picks.
  • Loyalty points overview: The balance, where the customer stands on the merchant’s tiers and what the next one unlocks, and the latest movements.
  • Made to order offer ledger: a product made after the order: when it is made and shipped, the queue, and a button that says when it is charged.
  • Member card: a signed-in member: the card with their number, tier and points toward the next reward.
  • Member offer perks band: a loyalty or member club with a few benefits: a dark panel, the invitation beside a grid of perks.
  • Member savings bars: show a member what the programme saved them, period by period, in their own figures.

All 409 storefront blocks