Retired products rows — Storefront block

Pro

storefront-retired-products-rows · for about, product pages

Retired products rows

Products no longer made with their years, quantity and reason: an honest page about what was stopped

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-retired-products-rows

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StorefrontRetiredProductsRows from '@/components/trame/blocks/storefront/storefront-retired-products-rows.vue'

const props = {
title: "What we no longer make",
lead: "Retiring a product is a choice too: here are our reasons.",
retired: [
{
name: "Tide linen jacket",
years: "2016 to 2022",
quantity: "1,200 pieces",
reason: "Our linen supplier went out of business."
},
{
name: "Mist beanie",
years: "2019 to 2023",
quantity: "3,400 pieces",
reason: "Too many returns: the knit pilled. We chose to stop."
}
]
}
</script>

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

Props

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

PropTypeDescription
title*stringWordswhat the page says about what stopped ("What we no longer make")
leadstringWordsone sentence on how the merchant chooses and visits them
retired*Retired[]products no longer made
footnotestringWordsa line on the makers we left, or how often audits are done
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Retired retired[] · 4 props
PropTypeDescription
name*stringWordsthe product no longer made
years*stringWordsthe years it was made ("2016 to 2023")
quantitystringWordshow many were made, as written ("1,200 pieces")
reason*stringWordswhy it stopped, honestly
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
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

A storefront section, for about, product pages; it uses clsx, motion, tailwind-merge.

More storefront blocks

  • Request status steps: a request waiting on someone: the steps so far, who decides, and what the customer can do meanwhile.
  • Restock notice email form: a sold-out category: the merchant’s restocks and an email field to be told.
  • Restock notify card: a sold-out product on its own: its picture, its state, one field and the shop’s promise about the address.
  • Restock notify inline row: a product page or a sold-out list: one compact row per sold-out variant with its own field and bell button.
  • Return request stepped: the request on one page in three numbered steps (items, reason, way back), a summary beside it.
  • Returning order review bag first: a signed-in customer: the bag first, saved address and card as rows, and who is signed in at the top.
  • Review form card: one form card with the product named on top: under the reviews of a product page, or on a page of its own.
  • Review form page: the product large on one side and the form beside it: the page a post-purchase email leads to.

All 409 storefront blocks