Archive shelf changelog — Storefront block
Freestorefront-archive-shelf-changelog · for catalog, landing pages
Archive shelf changelog
Versioned rows beside enduring notes for an evolving range; the merchant's own history 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-archive-shelf-changelogUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontArchiveShelfChangelog from '@/components/trame/blocks/storefront/storefront-archive-shelf-changelog.vue'
const props = {
title: "The materials register",
subtitle: "What we keep, and what we’ve changed.",
entries: [
{
name: "Mist canvas",
period: "Spring collection",
status: "Retired",
reason: "The dye didn’t give the result we wanted on the new cuts.",
parts: "Repairs: contact us so we can look at the piece.",
specification: "Coated canvas · dry hand",
image: {
src: "https://images.unsplash.com/photo-1602845860431-35374f24f48d?w=1600&q=80",
alt: "A mustard canvas backpack with leather straps, lying in the grass"
}
},
{
name: "Ecru lining",
period: "Permanent collection",
status: "In the catalog",
reason: "Kept for its suppleness.",
specification: "Woven cotton"
}
],
notes: [
{
title: "A useful record",
text: "These sheets help the workshop recognize your piece when it comes in for repair."
}
],
note: "Fictional archive for the block demo."
}
</script>
<template>
<StorefrontArchiveShelfChangelog v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe section’s heading |
| subtitle | string | Wordsa line under the heading |
| entries* | Entry[] | the entries shown, in order |
| notes | Note[] | short notes on the archive, each a title and a text |
| note | string | Wordsa short note under the section |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Entry entries[] · 9 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Wordsthe entry’s name |
| period* | string | Wordsthe merchant’s recorded period |
| status* | string | Wordsthe recorded state in words |
| reason | string | Wordswhy it was archived |
| units | number | Datahow many units were made |
| image | Image | the piece’s picture |
| note | string | Wordsa short note on the entry |
| parts | string | Wordswhat was kept or reused from it |
| specification | string | Wordsits specification, as the merchant writes it |
Image entries[].image · 2 props
| Prop | Type | Description |
|---|---|---|
| src* | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the picture shows, when the words do not say it |
Note notes[] · 2 props
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe note’s title |
| text* | string | Wordsthe note’s text |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a 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).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your 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:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too 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
- No motion; still under reduced motion
- Real buttons and links, a visible focus
A storefront section, for catalog, landing pages.
More storefront blocks
- Adjusted cart with adjustment: when something besides the lines moves the price (a trade-in credit, import duties): a card explains it in numbered steps above the summary.
- Advice questions: 3 or 4 yes/no questions, each opening its advice (details, no script): a short questionnaire in the page.
- Ageing stages row: how a choice ages, in four moments from the first week to the fifth year: a break-in or durability story.
- Alone or bundle versus: two columns, the product alone and the whole bundle, the bundle larger: a set sold at a real saving.
- Archive figures numbers: Supplied figures and a period chart above the archive entries; the merchant's own measures only.
- Bought together progress rail: a set with more than three companions: tickable cards in a scrolling row with a line showing the scroll, beside a panel with a bar (towards the shop’s free-shipping threshold when given, else the companions ticked), the total and the add button.
- Bought together strip: a product that is rarely bought alone: the product and up to three companions as pictures joined by plus signs, each one tickable, the set’s total beside.
- Brand directory featured plus index: three feature tiles, then an A to Z index of the other brands: a shop with many brands.