Shopfront facade — Hero block
Prohero-shopfront-facade · for home pages
Shopfront facade
The shop’s front edge to edge, the invitation over its foot and the address and hours on a card set like a plaque beside the door: a shop whose street front is its best picture (a bakery, a florist, a bookshop)
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/hero-shopfront-facadeUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import HeroShopfrontFacade from '@/components/trame/blocks/hero/hero-shopfront-facade.vue'
const props = {
title: "The bakehouse opens its doors at 7",
lead: "Sourdough bread, butter pastries and a batch of baguettes in the late afternoon, for those who get home late.",
pictures: [
{
src: "https://images.unsplash.com/photo-1620830958756-46335282c574?w=1600&q=80",
alt: "The bakery’s window, filled with pastries"
},
{
src: "https://images.unsplash.com/photo-1738898326912-83ec04de4ccf?w=720&q=80",
alt: "The bakery counter with its breads and pastries"
}
],
address: {
street: "12 Market Street",
postalCode: "21200",
city: "Hudson, NY",
landmark: "Across from the market hall, on the fountain side"
},
hours: [
{
days: "Tuesday to Friday",
hours: "7 a.m. – 1 p.m., 3:30 – 7:30 p.m."
},
{
days: "Saturday",
hours: "7 a.m. – 7:30 p.m."
}
],
note: "Closed August 4 to 25: our sourdough starter goes on vacation with us.",
actions: [
{
label: "Directions",
url: "https://bakery.example/directions"
},
{
label: "Order for tomorrow",
action: "collection",
record: {
id: "precommande"
}
}
],
options: {
eyebrow: "Neighborhood bakery"
}
}
</script>
<template>
<HeroShopfrontFacade v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe invitation to come in, 2 to 8 words: the page’s h1 ("The bakehouse opens at 7 am") |
| lead | string | Wordsone or two sentences on the shop itself |
| pictures* | Picture[] | the shop as it is: its front first, then one or two pictures inside (the counter, the shelves); the merchant’s own only |
| address* | Address | the shop’s address |
| hours* | Hour[] | the opening hours, as the merchant set them: never guessed |
| note | string | Wordsa notice about the hours ("Closed from 4 to 25 August") |
| actions | Action[] | up to two ways on: the route (an address outside the app) first, then the shop online |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Picture pictures[] · 2 props
| Prop | Type | Description |
|---|---|---|
| src* | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt* | string | Wordswhat the picture shows, in a sentence |
Address address · 4 props
| Prop | Type | Description |
|---|---|---|
| street* | string | Words"12 Market Street" |
| postalCode* | string | Wordsthe postcode |
| city* | string | Wordsthe town |
| landmark | string | Wordshow to find it ("Facing the market hall, fountain side") |
Hour hours[] · 2 props
| Prop | Type | Description |
|---|---|---|
| days* | string | Words"Tuesday to Saturday" |
| hours* | string | Wordsas the merchant writes them ("7 am – 1 pm, 3:30 pm – 7:30 pm", "Closed") |
Action actions[] · 4 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe link’s words, e.g. "See the collection" |
| action | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action applies to, passed to the host with it, if any |
| url | string | Designan address outside the app |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa short line over the title ("Neighbourhood bakery") |
| 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:
actions[]
A hero section, for home pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
More hero blocks
- Reel mosaic: the promise centred on a quiet pattern that lights up around the pointer (the grid with a few brief light streaks), then a calm bento of short muted clips within the page width: a studio, a tool or a library whose own work is the argument (the host’s own work only).
- Reel side: the mosaic turned on its side: a wide feature clip with up to three smaller ones under it on the start side, the promise beside them aligned to the start, over the same quiet pattern: a studio, a tool or a library that leads with one piece of its work and wants the words read alongside it (the host’s own work only).
- Reel tilted wall: the same centred promise over a wall of clips laid on a plane turned in 3D, running off both edges and fading at the foot: a body of work seen as a whole, more atmosphere than detail (the host’s own work only).
- Request bar: one to three short fields in a single bar under a centred promise: an address to leave, a quick callback.
- Service side card: someone who sells a service: what is offered, with the one-line scope and the price of each, in a card beside the intro — the merchant’s own only.
- Showcase framed media: a product or an app with a screenshot: the words on top, the picture in a frame running off the fold.
- Signature corner tiles: one full-bleed picture with the promise at its lower left and the pieces as small picture tiles in the lower-right corner: fashion or accessories, where the picture is the argument and the products a discreet addition.
- Signature product rail: a large picture with the promise at its foot and the two or three pieces stacked in a dark column beside it: a shop that wants the promise and the way to buy in the same first screen.