Hero, split
betaHeadline, subcopy and two actions beside a portrait photo, with up to three figure chips over its corners.
npx rasengan-ui add hero-split
- 94%invoices paid on time
- 2 daysfrom payment to your bank
- 12kstudios and freelancers
- Use it
- A product sold by and to people: a face or the product in someone's hands says more than a screenshot.
- Avoid it
- No photo worth the space: hero-centered leads with the product shot.
- Built with
- ButtonText Reveal
- Pairs with
- Logos, gridFeatures, alternating
Installation
It installs into components/blocks/hero-split/, with what it uses (Button, 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):
The headline reveals word by word when the page loads (trigger="mount"), and is simply there with motion off. Up to three chips sit over the photo's corners on a wide screen and line up under it on a narrow one: use real figures. Its heading is the page's h1; pass headingLevel={2} if it is not the page's first section.
Content
| Field | Type | Limits | Guidance |
|---|---|---|---|
eyebrowoptional | string | ≤ 48 chars | A few words above the headline: 'Invoicing for small studios'. |
headline | string | 8–70 chars | The promise in at most nine words. |
subline | string | 20–180 chars | |
primary | object | ||
primary.label | string | 1–32 chars | A verb first, two to four words: 'Start free', 'Book a table'. |
primary.href | string | A path ('/pricing'), an anchor ('#menu'), or a full URL. | |
secondaryoptional | object | ||
secondary.label | string | 1–32 chars | A verb first, two to four words: 'Start free', 'Book a table'. |
secondary.href | string | A path ('/pricing'), an anchor ('#menu'), or a full URL. | |
chipsoptional | object[] | ≤ 3 items | Up to three real figures, shown over the photo's corners on a wide screen, under it on a narrow one. |
chips[].value | string | 1–12 chars | '94%', '2 days', '12k'. |
chips[].label | string | 2–32 chars | |
image | object | A person or the product in use, portrait (4:5). Its alt says who or what it shows. | |
image.src | string | A local path ('/images/terrace.jpg') or the project's asset URL. | |
image.alt | string | ≤ 140 chars | What the image shows, for people who cannot see it. Empty only if purely decorative. |
image.width | integer | ||
image.height | integer |
Props
| Prop | Notes |
|---|---|
content | HeroSplitContent; the example when left out |
id | the section's id, for anchor links; "hero" by default |
headingLevel | 1, 2 or 3: the heading's tag; 1 by default |
className | on the <section>, for spacing |
Accessibility
- The photo has its own
alt; the chips are text, read after it. - The page's one
h1by default.