Accepted items tiles — Storefront block

Pro

storefront-accepted-items-tiles · for home, landing, product pages

Accepted items tiles

What is accepted as picture tiles, the steps in a strip above: a shop that takes back several kinds of items

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-accepted-items-tiles

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import StorefrontAcceptedItemsTiles from '@/components/trame/blocks/storefront/storefront-accepted-items-tiles.vue'

const props = {
title: "Your old gear has another season in it",
lead: "Cairnline takes back jackets, packs, boots and tents in good shape, repairs them in our workshop and sends them back up the trail. You get store credit.",
steps: [
{
title: "Get an online estimate",
text: "Describe your item in two minutes, with a photo."
},
{
title: "Send it in",
text: "We email you a prepaid return label."
}
],
accepted: [
{
name: "Jackets and coats",
text: "Clean, zippers working",
image: "https://images.unsplash.com/photo-1716825292301-ef220ba3d7d9?w=1600&q=80",
alt: "A hiker in an orange jacket facing snowy mountains"
},
{
name: "Backpacks",
text: "No tears, straps intact",
image: "https://images.unsplash.com/photo-1602684154647-eb1e2a9fd92e?w=1600&q=80",
alt: "A hiker seen from behind with an orange beanie and a backpack, facing a mountain lake"
}
],
values: [
{
item: "Technical jacket",
detail: "in good condition",
value: "Up to $60 in credit"
},
{
item: "Backpack",
detail: "no defects",
value: "Up to $35 in credit"
}
],
terms: "Credit is valid for twelve months and can be used across the whole site. The final amount is set once we’ve checked the item.",
action: {
label: "Estimate my item",
action: "trade-in"
},
options: {
eyebrow: "Cairnline trade-in"
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordswhat the shop offers ("Give us back what you no longer wear")
leadstringWordsone sentence on the programme: what the shop does with the items it takes back
steps*Step[]how it works, in order: two to five steps
accepted*Accepted[]what is accepted
valuesValue[]the merchant’s own table of values or credits: nothing computed, nothing estimated by the block
termsstringWordsthe conditions and the limits, as the merchant wrote them ("Credit valid 12 months, non-refundable")
actionActionthe call to action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Step steps[] · 2 props
PropTypeDescription
title*stringWordsthe step in a few words ("Get an online estimate")
textstringWordswhat the visitor does or what happens, in one or two sentences
Accepted accepted[] · 4 props
PropTypeDescription
name*stringWordsa kind of item the shop takes back ("Jackets and coats")
textstringWordsits condition or limit ("clean, zips working")
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the picture shows
Value values[] · 3 props
PropTypeDescription
item*stringWordsthe kind of item or the condition ("Technical jacket")
detailstringWordsa precision ("in good condition")
value*stringWordswhat the shop gives, exactly as the merchant set it ("Up to €60 credit")
Action action · 3 props
PropTypeDescription
label*stringWordswhat happens ("Estimate my item")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Options options · 3 props
PropTypeDescription
eyebrowstringWordsa small line above the title ("Trade-in")
acceptedTitlestringWordsthe heading of the accepted items ("What we take back")
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: action

A storefront section, for home, landing, product pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.

Built with

The components this block is made of; each one installs on its own too.

More storefront blocks

  • Accepted methods families: a payments page or a cart: the accepted methods by family, and the refused ones with their reason.
  • Addon picker main and addons: a big main card with checkboxes for the add-ons beside it and the summary under: add-ons that complete one product.
  • Address check side by side: Compare the entered address with a postal service suggestion at equal prominence.
  • Address check stacked: Stack the two addresses in a narrow checkout column, keeping both choices available.
  • 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.

All 409 storefront blocks