Hero, photo
betaWhere and what, a warm headline, two actions and three short facts beside a large photo of the place or a dish.
npx rasengan-ui add hero-photo
Cameroonian kitchen · Akwa, Douala
Ndolé on Fridays, grilled fish every evening, and plantains fried to order. Eat in on the terrace or take it home.
- Open every day
- Delivery in Akwa and Bonapriso
- Since 2009
- Use it
- Opening the site of a restaurant, a salon or a shop, where a photo says more than a slogan.
- Avoid it
- No good photo yet: use hero-centered with text alone.
- Built with
- ButtonText Reveal
- Pairs with
- Menu, categoriesServices, list
Installation
It installs into components/blocks/hero-photo/, 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 photo loads eagerly, as it is above the fold. Use a real photo of the place or its best dish, landscape (about 4:3).
Content
| Field | Type | Limits | Guidance |
|---|---|---|---|
eyebrowoptional | string | ≤ 48 chars | What and where, briefly: 'Cameroonian kitchen · Akwa, Douala'. |
headline | string | 6–60 chars | The place's promise, warm and concrete: 'Home cooking, the way Douala likes it'. |
subline | string | 20–180 chars | What people come for, in one or two sentences. |
primary | object | The main action: 'See the menu', 'Book a table', 'Order on WhatsApp'. | |
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. | |
highlightsoptional | string[] | ≤ 3 items | Short facts under the actions: 'Open every day', 'Delivery in Akwa and Bonapriso'. |
image | object | A photo of the place or its best dish, landscape (4:3). Its alt says 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 | HeroPhotoContent; 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
- A
<section>named by its headline, the page'sh1by default. - The photo's
altsays what it shows; the highlights are a list.