Budget selection tiles — Storefront block

Pro

storefront-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-tiles

Usage

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.

PropTypeDescription
eyebrowstringWordswhat this is ("Find the right model")
title*stringWordsthe section’s title, in a few words ("Which bag for which use?")
leadstringWordsone 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
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Tile tiles[] · 5 props
PropTypeDescription
label*stringWordsthe tile’s headline ("Around €50")
textstringWordswhat this budget or need gets
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens (a filtered catalogue, a category)
countnumberDatahow many products match, from the catalogue
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
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: 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.

All 409 storefront blocks