Budget selection tiles — Storefront block
Prostorefront-budget-selection-tiles · for home, catalog, landing pages
Budget selection tiles
Three or four tiles "around X €", each linking to the catalogue filtered on it: a visitor who starts from a budget
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-budget-selection-tilesUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontBudgetSelectionTiles from '@/components/trame/blocks/storefront/storefront-budget-selection-tiles.vue'
const props = {
eyebrow: "Find the right bag",
title: "Which bag for what?",
lead: "Two questions, and we’ll tell you which of our bags will suit you best.",
tiles: [
{
label: "Around $40",
text: "Pouches and small accessories",
count: 6,
action: "catalog",
record: {
id: "budget-1"
}
},
{
label: "Around $80",
text: "Everyday backpacks",
count: 11,
action: "catalog",
record: {
id: "budget-2"
}
}
]
}
</script>
<template>
<StorefrontBudgetSelectionTiles v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordswhat this is ("Find the right model") |
| title* | string | Wordsthe section’s title, in a few words ("Which bag for which use?") |
| lead | string | Wordsone or two sentences under the title: what the questions are for |
| tiles* | Tile[] | one tile per budget, each leading to the catalogue filtered on it |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Tile tiles[] · 5 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe tile’s headline ("Around €50") |
| text | string | Wordswhat this budget or need gets |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens (a filtered catalogue, a category) |
| count | number | Datahow many products match, from the catalogue |
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 |
| Link | your router’s link component |
| 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
- Subtle motion: one short reveal; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
tiles[]
A storefront section, for home, catalog, landing pages; it uses @lucide/vue, clsx, motion, tailwind-merge.
More storefront blocks
- Brand directory featured plus index: three feature tiles, then an A to Z index of the other brands: a shop with many brands.
- Brand rail banner rail: wide banner tiles with the brand’s name over a photo, in a scrolling row: a multi-brand shop that leads with its brands.
- Brand rail makers grid: square portraits with the maker’s name and craft: a small craft shop or a marketplace of makers.
- Browsing history strip: a tight line of small thumbnails with name and price, between a page’s content and its footer or in the cart: it reminds without taking room.
- Bulk order paste: a buyer with a list in a spreadsheet or an e-mail: paste references and quantities, then check the lines.
- Bundle builder main plus trio: one wide main card and three small complementary cards over a band comparing the separate and the bundle prices.
- Bundle builder stack: one column of rows with an add button each, then a total card: a short list, good on a phone or in a cart.
- Bundle builder toggle list: the main product, add-ons with switches and a sticky total bar: the visitor builds the set one choice at a time.