Wall card over grid — Hero block

Free

hero-wall-card-over-grid · for home, landing, about pages

Wall card over grid

A dense grid of square pictures edge to edge with the words on a solid card over its middle: a portfolio whose pictures are all of one hand (the merchant’s own work only).

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-wall-card-over-grid

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import HeroWallCardOverGrid from '@/components/trame/blocks/hero/hero-wall-card-over-grid.vue'

const props = {
title: "Clay, fire and a lot of patience",
images: [
{
src: "https://images.unsplash.com/photo-1772607407371-44031ae3b69f?w=600&q=70",
alt: "Terracotta bowls on wooden shelves"
},
{
src: "https://images.unsplash.com/photo-1607556672054-054f3e90363f?w=600&q=70",
alt: "Hands smoothing a pot on the wheel with a sponge"
}
],
text: "Bowls, cups and plates thrown by hand in our studio, and fired in the wood kiln twice a month.",
action: {
label: "See the pieces",
action: "catalog"
},
options: {
eyebrow: "Ceramics studio, Hudson Valley"
}
}
</script>

<template>
<HeroWallCardOverGrid v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
title*stringWordsthe promise, 3 to 10 words: the page’s h1
images*Image[]8 to 24 pictures of the merchant’s own work, small ones (thumbnails); past 24 they are dropped, below a full wall the empty cells are tint tiles, never a repeated picture
textstringWordsone or two sentences under the title
actionActionthe call to action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Image images[] · 2 props
PropTypeDescription
src*stringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the picture shows, when the words do not say it
Action action · 3 props
PropTypeDescription
label*stringWordswhat happens ("See the pieces")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Options options · 2 props
PropTypeDescription
eyebrowstringWordsa few words above the title (the studio’s trade, its town)
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: action

A hero section, for home, landing, about pages; it uses class-variance-authority, clsx, motion, reka-ui, tailwind-merge.

Built with

The components this block is made of; each one installs on its own too.

More hero blocks

  • Type statement: left-aligned and huge, the text and the action on a rule under the statement, the pictures in a staggered strip: a brand with a voice.
  • Video ambient: the film plays by itself, muted and in a loop, behind the words at the foot of the first screen, with a pause button and a "Watch the film" button for the whole film with its sound: a place, a craft or a product in use, shown before it is told; a short file of a few MB, the merchant’s own film only.
  • Video device side: the words beside a phone holding a vertical film, over a tinted disc: a mobile app, a reel or a portrait film; the merchant’s own film only.
  • Video framed below: the words centred first, then a wide framed film that straightens as the page scrolls: a product or a service whose promise must be read before the film; the merchant’s own film only.
  • Video poster overlay: the film’s still fills the first screen with the words at its foot: the film is the argument (a founder, a workshop, a place); the merchant’s own film only.
  • Video split card: the words beside a rounded player card naming the person on screen: a quieter landing or a customer story; the merchant’s own film only.
  • Views stepper side: the words on the left with a numbered stepper under the actions, the chosen screen on the right running off the page: screens that follow an order (set up, run, report).
  • Views tabs over: the words centred, a row of pill tabs under the actions and the chosen screen in a wide frame below: a product whose screens weigh the same (planning, invoices, reports).

All 102 hero blocks