Skip to content
New

Hero, centred

beta

An announcement, a headline revealed word by word, one line of subcopy, two calls to action and a product shot.

npx rasengan-ui add hero-centered
New: recurring invoices

Ship invoices before your coffee cools

Senbon drafts, sends and chases your invoices, so small studios get paid on time without a finance team.

Free for 14 days. No card needed.

The Senbon dashboard: money owed this month, a chart of payments and a list of recent invoices.
Use it
Opening a product page with a clear one-line promise.
Avoid it
Headlines over nine words; a page without a call to action.

Installation

Terminal
npx rasengan-ui add hero-centered

It installs into components/blocks/hero-centered/, with what it uses (Button, Badge, Text reveal) and lib/blocks.ts.

Usage

Without content, the block shows its example. Pass your own, typed by the block's schema, from a content file (here, the example with one field changed):

app/_routes/index.page.tsx
import { HeroCentered } from "@/components/blocks/hero-centered";
import { home } from "@/content/home";
 
export default function Home() {
  return <HeroCentered content={home.hero} />;
}
content/home.ts
import { example, type HeroCenteredContent } from "@/components/blocks/hero-centered";
 
export const home = {
  hero: {
    ...example,
    headline: "Your promise in nine words",
  } satisfies HeroCenteredContent,
};

The example's product shot is a placeholder installed in public/placeholders/; replace image with your own screen.

Content

FieldTypeLimitsGuidance
eyebrowoptionalobjectA short announcement above the headline, linked: 'New: recurring invoices'.
eyebrow.labelstring1–32 charsA verb first, two to four words: 'Start free', 'Book a table'.
eyebrow.hrefstringA path ('/pricing'), an anchor ('#menu'), or a full URL.
headlinestring8–70 charsThe product's promise in at most nine words: 'Ship invoices before coffee'.
sublinestring20–180 charsWho it is for and what changes for them, in one or two sentences.
primaryobject
primary.labelstring1–32 charsA verb first, two to four words: 'Start free', 'Book a table'.
primary.hrefstringA path ('/pricing'), an anchor ('#menu'), or a full URL.
secondaryoptionalobject
secondary.labelstring1–32 charsA verb first, two to four words: 'Start free', 'Book a table'.
secondary.hrefstringA path ('/pricing'), an anchor ('#menu'), or a full URL.
noteoptionalstring≤ 60 charsSmall print under the buttons: 'Free for 14 days, no card needed'.
imageoptionalobjectA product shot, wide (16:10 or so), shown under the text. Its alt says what the screen shows.
image.srcstringA local path ('/images/terrace.jpg') or the project's asset URL.
image.altstring≤ 140 charsWhat the image shows, for people who cannot see it. Empty only if purely decorative.
image.widthinteger
image.heightinteger

Props

PropNotes
contentHeroCenteredContent; the example when left out
idthe section's id, for anchor links; "hero" by default
headingLevel1, 2 or 3: the heading's tag; 1 by default
classNameon the root element, for spacing

Accessibility

  • A <section> named by its headline, which is the page's h1 by default.
  • The headline is in the server's HTML; with motion off or reduced it is simply there.
  • The product shot loads eagerly (fetchpriority="high"): it is above the fold. Its alt says what the screen shows.