Brand directory featured plus index — Storefront block

Pro

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

Usage

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.

PropTypeDescription
title*stringWordsthe section title ("Our brands")
subtitlestringWordsone sentence under the title
items*Item[]Datathe brands or makers the shop really sells; `summary` is its tagline, `count` its number of products
openstringActionthe page action a brand opens (its collection); it receives the brand
allActionstringActionthe page action of the "See all" link
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Item items[] · 7 props
PropTypeDescription
id*string | numberDatathe record’s id in the tool that answers it
name*stringWordsthe category’s name
imagestringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the category’s picture shows
countnumberhow many products it holds
summarystringWordsone short line on the category
logostringPicturethe brand’s own logo, as the brand supplied it: never drawn by the shop
Options options · 2 props
PropTypeDescription
indexbooleanshow the A to Z index of the other brands (true by default)
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
  • Expressive motion, within its budget; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: open, allAction
  • Reads categories from 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.

All 409 storefront blocks