Archive figures numbers — Storefront block

Pro

storefront-archive-figures-numbers · for catalog, landing pages

Archive figures numbers

Supplied figures and a period chart above the archive entries; the merchant's own measures 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-figures-numbers

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StorefrontArchiveFiguresNumbers from '@/components/trame/blocks/storefront/storefront-archive-figures-numbers.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."
}
],
figures: [
{
label: "Samples kept — demo",
value: 24
},
{
label: "Materials studied — demo",
value: 8
}
],
chart: [
{
period: "First fictional reading",
value: 8
},
{
period: "Second fictional reading",
value: 16
}
],
note: "Fictional archive for the block demo."
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe section’s heading
subtitlestringWordsa line under the heading
entries*Entry[]the entries shown, in order
notesNote[]short notes on the archive, each a title and a text
figures*Figure[]key figures of the archive, each a label and a value
chartChart[]a figure over time, one bar per period
notestringWordsa short note under the section
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Entry entries[] · 9 props
PropTypeDescription
name*stringWordsthe entry’s name
period*stringWordsthe merchant’s recorded period
status*stringWordsthe recorded state in words
reasonstringWordswhy it was archived
unitsnumberDatahow many units were made
imageImagethe piece’s picture
notestringWordsa short note on the entry
partsstringWordswhat was kept or reused from it
specificationstringWordsits specification, as the merchant writes it
Image entries[].image · 2 props
PropTypeDescription
src*stringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the picture shows, when the words do not say it
Note notes[] · 2 props
PropTypeDescription
title*stringWordsthe note’s title
text*stringWordsthe note’s text
Figure figures[] · 3 props
PropTypeDescription
label*stringWordswhat the figure is
value*numberDatathe figure
notestringWordsa short note on the figure
Chart chart[] · 2 props
PropTypeDescription
period*stringWordsthe period, e.g. "2021"
value*numberDatathe figure for that period
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
  • 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 shelf cards status: Material cards with a specification and a status beside the picture; the merchant's own archive only.
  • Archive shelf changelog: Versioned rows beside enduring notes for an evolving range; the merchant's own history only.
  • Archive shelf graveyard list: A quiet list of retired entries and the availability of parts; the merchant's own records only.
  • Archive shelf status table: A responsive inventory of periods, units and recorded states; the merchant's own archive only.

All 409 storefront blocks