Image quiet — Hero block

Pro

hero-image-quiet · for home, catalog, landing pages

Image quiet

A calm shop or a picture busy with detail: the title centred (or at the start) on the page, the picture under it in a wide frame

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-image-quiet

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import HeroImageQuiet from '@/components/trame/blocks/hero/hero-image-quiet.vue'

const props = {
title: "Jackets that hold up in the rain",
lead: "Cut from coated canvas in Portland, sewn and heat-sealed to stay dry from fall to spring.",
image: "https://images.unsplash.com/photo-1694561418303-16393986b86d?w=1600&q=80",
alt: "A man in profile wearing a dark green hooded rain jacket by a misty lake",
action: {
label: "See rain jackets",
action: "collection",
record: {
id: "vestes-pluie"
}
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe shop’s promise in a few words: the page’s h1 ("Jackets that hold up in the rain")
leadstringWordsone or two sentences under the title, in the merchant’s words
image*stringPicturethe one picture the page opens on: the shop’s own, wide enough to crop
altstringWordswhat the picture shows, in a sentence; empty or missing when the words already say it (decorative)
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
Action action · 3 props
PropTypeDescription
label*stringWordswhat happens ("See the collection")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens (a collection), if any
Options options · 3 props
PropTypeDescription
height'tall' | 'medium'how much of the first screen the picture takes: "tall" (the default) nearly all of it, "medium" about two thirds
align'start' | 'center'where the words sit: at the start (the default) or centred
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, catalog, landing pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.

More hero blocks

  • Flows workflow tabs: a product explained by its flows: centred words over a tab row, each tab a short chain of steps.
  • Form card: the promise and what the visitor gets on one side, a framed form panel on the other: a quote or a demo that asks a few questions.
  • Globe beside: a team, a network of makers or depots, with more to say: the words at the left and a whole dotted globe at the right, its first places named on leaders; the merchant’s own places only.
  • Globe rising: a brand whose argument is where it makes or ships, told in few words: the words centred over a large dotted hemisphere rising from the bottom edge, its pins named on hover and listed under it; the merchant’s own places only.
  • Marquee columns side: the promise on the start side, beside two or three columns of pictures scrolling slowly up and down in opposite directions (still below the expressive level, a short still grid on a phone): a studio, a maker or a shop whose body of work is the argument and wants its words read first, the pictures as a living gallery beside them (the merchant’s own work or products only).
  • Marquee cylinder: the promise centred above one row of pictures laid on the inside of a cylinder, flat at the centre and curling toward the visitor at both ends, streaming slowly sideways (a still curve below the expressive level): a studio or a product whose body of work is the argument and wants one striking, immersive picture rail rather than two plain rows (the merchant’s own work or products only).
  • Marquee rows: the promise centred above two full-width rows of pictures sliding slowly in opposite directions (one row under six pictures), still below the expressive level: a studio, a maker or a shop whose body of work is the argument (the merchant’s own work or products only).
  • Ornament: a type-led opening with no integrations to show: the words at one corner of a large drawn object, purely decorative.

All 102 hero blocks