Photo request — Hero block
Prohero-photo-request · for home, landing pages
Photo request
A tall picture with the form panel overlapping it: a workshop, a venue or a service whose place sells the request
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-photo-requestUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import HeroPhotoRequest from '@/components/trame/blocks/hero/hero-photo-request.vue'
const props = {
title: "A quote for your custom order within 48 hours",
lead: "Tell us what you’re looking for: the workshop replies by email with a price, a lead time and a leather swatch.",
fields: [
{
name: "name",
label: "Name",
type: "text",
placeholder: "Camille Martin",
required: true
},
{
name: "email",
label: "Email address",
type: "email",
placeholder: "[email protected]",
required: true
}
],
submitLabel: "Get my quote",
formAction: "quote.request",
consent: "Your answers are used only to prepare this quote and are deleted after three months.",
points: [
"A reply from a craftsperson, not a bot",
"Free quote, no commitment"
],
images: [
{
src: "https://images.unsplash.com/photo-1628483211662-9bcc692c46dc?w=1600&q=80",
alt: "A cognac leather card holder, spools of thread and leatherworking tools on a workbench"
},
{
src: "https://images.unsplash.com/photo-1787005241178-c9006ea9610b?w=1600&q=80",
alt: "Hands trace a pattern in pencil on leather"
}
],
options: {
eyebrow: "Quote on request",
formTitle: "Your request"
}
}
</script>
<template>
<HeroPhotoRequest v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordsthe promise, in one sentence ("A quote for your workshop in 48 hours") |
| lead | string | Wordsone or two sentences on what happens after sending the form |
| fields | Field[] | the form’s fields, in order |
| submitLabel* | string | Wordswhat the button does ("Get my quote") |
| formAction* | string | Actionthe page action that receives the form (posted by it) |
| consent | string | Wordswhat the answers are used for and the right to leave, as the merchant states it, under the button |
| points | string[] | Wordsone thing the visitor gets or knows after sending, as the merchant states it |
| images* | Image[] | one to three pictures beside the request |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Field fields[] · 6 props
| Prop | Type | Description |
|---|---|---|
| name* | string | Designthe field’s name as the page action receives it ("email", "company", "message") |
| label* | string | Wordswhat the field asks ("Email address") |
| type | 'email' | 'text' | 'tel' | 'textarea' | 'select' | the kind of field; text by default |
| placeholder | string | Wordsan example of the answer, not an instruction |
| required | boolean | true: the form is not sent without it |
| choices | string[] | Wordsone choice of a select, as the merchant words it |
Image images[] · 2 props
| Prop | Type | Description |
|---|---|---|
| src* | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the picture shows, when the words do not say it |
Options options · 5 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa short line above the title ("On quote") |
| formTitle | string | Wordsthe heading of the form’s panel ("Your request") |
| status | 'success' | 'error' | Datathe answer to the last submission, when the host re-renders with it |
| statusText | string | Wordswhat that answer says |
| 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 |
| 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:
formAction
A hero section, for home, landing pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
More hero blocks
- 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.
- Portrait: a person-led brand: the portrait with an availability dot beside the intro, the clients’ logos passing under it at the expressive level (a still row below it) — the merchant’s own only.
- Preorder: a limited run in preorder: the price and deposit, how many are reserved, and the production timeline.
- Product introduction stats grid: four figures the merchant states in a bordered grid: a track record is the argument.
- Product introduction steps: an ordered list of what happens first: a product that is easy to start with — the merchant’s own only.