Usage guide do dont — Storefront block

Pro

storefront-usage-guide-do-dont · for product, content pages

Usage guide do dont

Separate recommended and prohibited gestures into two readable columns; the merchant's own guidance 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-usage-guide-do-dont

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StorefrontUsageGuideDoDont from '@/components/trame/blocks/storefront/storefront-usage-guide-do-dont.vue'

const props = {
title: "Make fine materials last",
intro: "Simple steps, suited to each part of your bag.",
groups: [
{
name: "Canvas",
note: "Work on a dry surface.",
steps: [
{
title: "Remove the dust",
text: "Brush gently along the weave.",
symbol: "brush",
when: "After use",
product: "Soft brush",
skippable: "If the canvas is clean"
},
{
title: "Let it dry in the shade",
text: "Open the bag and set it in a well-aired room.",
symbol: "dry",
when: "After a downpour",
skippable: "Never store it damp"
}
]
},
{
name: "Lining",
note: "Work on a dry surface.",
steps: [
{
title: "Remove the dust",
text: "Brush gently along the weave.",
symbol: "brush",
when: "After use",
product: "Soft brush",
skippable: "If the canvas is clean"
},
{
title: "Let it dry in the shade",
text: "Open the bag and set it in a well-aired room.",
symbol: "dry",
when: "After a downpour",
skippable: "Never store it damp"
}
]
}
]
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe section’s heading
introstringWordsa sentence or two under the heading
groups*Group[]the groups shown, in order
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Group groups[] · 3 props
PropTypeDescription
name*stringWordsthe group’s name
notestringWordsa short note on the group
steps*Step[]the group’s steps, in order
Step groups[].steps[] · 7 props
PropTypeDescription
title*stringWordsthe step’s title
textstringWordsthe step’s text
avoidbooleantrue: a thing not to do
symbol'wash' | 'dry' | 'heat' | 'brush' | 'avoid'the care symbol shown with it
whenstringWordswhen to do it, e.g. "Every week"
productstringWordsthe product to use for this step, as the merchant names it
skippablestringWordswhether the step may be skipped, in the merchant’s words, e.g. "Optional"
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 product, content pages; it uses @lucide/vue.

More storefront blocks

  • Technical products rows: one compact row per product with a mono spec line, rating and price: technical catalogues; the merchant’s own products and figures only.
  • Threshold addons: a bar from the cart to the free-shipping threshold, small add-ons to close the gap, the flat rate said too: a cart just short of the threshold.
  • Tiered bundle builder rail and panel: product cards in a grid beside a sticky panel with the tier rail lit as the count rises, the picks and the total (a bar that opens on a phone): a wide range to pick from; the merchant’s own tiers and prices only.
  • Tiered bundle builder slots: a row of empty places to fill under the tier line, the products below, each pick dropping into the next place: a short, countable bundle ("3 pieces, −10%"); the merchant’s own tiers and prices only.
  • Trade in steps and estimate: the steps in a column and the merchant’s table of values beside it: a programme with real, published credits.
  • Variant stock alert grid: a product with many sizes or colours: a grid showing each one’s state, the sold-out ones can be ticked for one alert.
  • Viewed products compact rail: small compact cards in a tight rail: the "Recently viewed" section on a product or cart page.
  • Vote ballot: A list of candidates and supplied standings with a vote action; the merchant's own votes and dates only.

All 409 storefront blocks