Brand directory featured plus index — Storefront block
Prostorefront-brand-directory-featured-plus-index · for home, catalog pages
Brand directory featured plus index
Three feature tiles, then an A to Z index of the other brands: a shop with many brands
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-brand-directory-featured-plus-indexUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import StorefrontBrandDirectoryFeaturedPlusIndex from '@/components/trame/blocks/storefront/storefront-brand-directory-featured-plus-index.vue'
const props = {
title: "Our brands",
subtitle: "Twelve makers we know well, and every piece of theirs we sell.",
items: [
{
id: "1",
name: "Tide Atelier",
summary: "Beach and sailing clothes, sewn in small batches.",
count: 18,
image: "https://images.unsplash.com/photo-1517699418036-fb5d179fef0c?w=1600&q=80",
alt: "Two surfers walking back up the beach at sunset"
},
{
id: "2",
name: "Maison Alpage",
summary: "Jackets and fleeces for cold days.",
count: 24,
image: "https://images.unsplash.com/photo-1551698618-1dfe5d97d256?w=1600&q=80",
alt: "A skier in a blue jacket on a snowy slope"
}
],
open: "brand",
allAction: "brands"
}
</script>
<template>
<StorefrontBrandDirectoryFeaturedPlusIndex v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe section title ("Our brands") |
| subtitle | string | Wordsone sentence under the title |
| items* | Item[] | Datathe brands or makers the shop really sells; `summary` is its tagline, `count` its number of products |
| open | string | Actionthe page action a brand opens (its collection); it receives the brand |
| allAction | string | Actionthe page action of the "See all" link |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Item items[] · 7 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe record’s id in the tool that answers it |
| name* | string | Wordsthe category’s name |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the category’s picture shows |
| count | number | how many products it holds |
| summary | string | Wordsone short line on the category |
| logo | string | Picturethe brand’s own logo, as the brand supplied it: never drawn by the shop |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| index | boolean | show the A to Z index of the other brands (true by default) |
| 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 |
| asset | a picture’s address as your app serves it |
| 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
- Expressive motion, within its budget; still under reduced motion
- Real buttons and links, a visible focus
- Asks your app through actions:
open,allAction - Reads
categoriesfrom your app
A storefront section, for home, catalog pages; it uses @lucide/vue, clsx, motion, tailwind-merge.
More storefront blocks
- Archive shelf status table: A responsive inventory of periods, units and recorded states; the merchant's own archive only.
- Archive shelf wall: Dated picture frames with separate curatorial notes; the merchant's own archive only.
- Bought together progress rail: a set with more than three companions: tickable cards in a scrolling row with a line showing the scroll, beside a panel with a bar (towards the shop’s free-shipping threshold when given, else the companions ticked), the total and the add button.
- Bought together strip: a product that is rarely bought alone: the product and up to three companions as pictures joined by plus signs, each one tickable, the set’s total beside.
- 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.
- Budget selection tiles: three or four tiles "around X €", each linking to the catalogue filtered on it: a visitor who starts from a budget.