Marquee rows — Hero block
Prohero-marquee-rows · for home, landing pages
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)
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-marquee-rowsUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import HeroMarqueeRows from '@/components/trame/blocks/hero/hero-marquee-rows.vue'
const props = {
eyebrow: "Spring firing, now in the shop",
title: "Stoneware thrown, glazed and fired in one small kiln",
subtitle: "Hollow Pine Pottery is two potters in a converted barn. Every bowl, cup and plate below came out of our own kiln this year.",
primaryAction: {
label: "Shop the firing",
action: "catalog"
},
secondaryAction: {
label: "Visit the studio",
action: "visit"
},
images: [
{
src: "https://images.unsplash.com/photo-1530006498959-b7884e829a04?w=900&q=75",
alt: "Two speckled white stoneware bowls, stacked",
shape: "portrait"
},
{
src: "https://images.unsplash.com/photo-1610701596007-11502861dcfa?w=900&q=75",
alt: "Pale stoneware cups and jars on a shelf"
}
]
}
</script>
<template>
<HeroMarqueeRows v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa short chip above the title ("Spring firing, now in the shop") |
| title* | string | Wordsthe one promise, in a sentence (40 to 80 characters): the page’s h1 |
| subtitle | string | Wordswhat it is and for whom, in one or two sentences |
| primaryAction* | PrimaryAction | the main button: its words and the page action it runs |
| secondaryAction | SecondaryAction | a quieter second action beside the main one: its words and the page action |
| command | string | Wordsa terminal command that installs it, shown as plain text in a pill with a copy button |
| images* | Image[] | 3 to 24 pictures of the merchant’s own work or products; in rows, from 6 they alternate between two rows (two rows of 12 at most); on the cylinder, one row in order; in columns-side, two columns (three from 9 pictures); each may lead to its own page |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
PrimaryAction primaryAction · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Try for free") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
SecondaryAction secondaryAction · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordswhat happens ("Try for free") |
| action* | string | Actiona named action of the page |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Image images[] · 5 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 few words: required, it is the picture for those who do not see it, and the link’s name |
| shape | 'portrait' | 'square' | 'landscape' | the picture’s shape in the row: portrait (4:5), square, or landscape (3:2, the default) |
| action | string | Actionwhere the tile leads: the piece’s own page, with its record |
| record | Record<string, unknown> | Datathe record the action opens, if any |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| 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:
primaryAction,secondaryAction,images[]
A hero section, for home, landing pages; it uses @lucide/vue, @vueuse/core, 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
- Image overlay: one strong, wide picture of the shop’s own: the title and the action laid over it on a legible wash, the picture across the whole width.
- 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.
- Image split: a picture with a subject that must not be covered (a face, a piece in detail): the words in their own column, the picture beside them running to the page’s edge.
- Ornament: a type-led opening with no integrations to show: the words at one corner of a large drawn object, purely decorative.
- Photo request: a tall picture with the form panel overlapping it: a workshop, a venue or a service whose place sells the request.
- 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.