Ornament — Hero block

Pro

hero-ornament · for home, landing pages

Ornament

A type-led opening with no integrations to show: the words at one corner of a large drawn object, purely decorative

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-ornament

Usage

Its demo data, shortened (Using blocks).

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

const props = {
title: "Homes by the water, sold by people who live here",
subtitle: "Harbor & Pine sells forty houses a year along the coast road. We visit every one twice, price it honestly and answer the phone on Sundays.",
primaryAction: {
label: "See the homes for sale",
action: "listings"
},
secondaryAction: {
label: "Get a free valuation",
action: "contact"
},
options: {
eyebrow: "Real estate on the coast road",
note: "Valuations within the week, no obligation"
}
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe one promise, in a sentence (60 to 90 characters at most)
subtitlestringWordswhat it connects and for whom, in one or two sentences
primaryAction*PrimaryActionthe main button: its words and the page action it runs
secondaryActionSecondaryActiona quieter second action beside the main one: its words and the page action
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
PrimaryAction primaryAction · 3 props
PropTypeDescription
label*stringWordswhat happens ("See the integrations")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
SecondaryAction secondaryAction · 3 props
PropTypeDescription
label*stringWordswhat happens ("See the integrations")
action*stringActiona named action of the page
recordRecord<string, unknown>Datathe record the action opens, if any
Options options · 3 props
PropTypeDescription
eyebrowstringWordsa short chip above the title ("New")
notestringWordsfine print under the actions
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
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: primaryAction, secondaryAction

A hero section, for home, landing pages; it uses @lucide/vue, 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 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.
  • 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).
  • 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.

All 102 hero blocks