Responsive marketing hero with four layouts, a badge/eyebrow, headline, copy, actions and an optional media slot.
Design intent
Landing pages repeat a headline cluster with an optional product shot. Hero standardizes the hierarchy and four responsive layouts (split, centered, stacked, overlay) while leaving the band tone and padding to Section.
npx @slipstream-ui/cli@latest add heroShip your next release.
Join 20,000+ product teams who ship customer-facing interfaces every week.
Usage overview
12,000+
events processed monthly
Usage overview
One workspace, fewer handoffs
Search every project, track the work, and keep the files in one place.
Pipeline
Know the account before the first call
Every account arrives with the team, plan, and context attached.
Account fit
94%
plan and team size match
Every project in one workspace
Move from idea to launch without another spreadsheet.
Sourcing
42
Diligence
18
Close
7
Build something people love
Three products, one platform, shipping every week.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | ReactNode | required | Main headline. Accepts inline markup for a highlighted phrase. |
| description | ReactNode | — | Supporting sentence under the headline. |
| eyebrow | ReactNode | — | Small overline above the headline. |
| badge | ReactNode | — | Pill above the headline. |
| actions | ReactNode | — | Primary and secondary calls to action. |
| media | ReactNode | — | Product shot, illustration, video or form shown beside or behind the copy. |
| mediaPosition | 'left' | 'right' | 'right' | Which side the media sits on at lg and up in the split layout. |
| align | 'left' | 'center' | 'left' | Copy alignment. |
| size | 'md' | 'lg' | 'lg' | Headline scale. |
| level | 1 | 2 | 1 | Heading level. |
| variant | 'split' | 'centered' | 'stacked' | 'overlay' | — | Layout. Defaults to split with media, centered without. |
| as | 'div' | 'section' | 'header' | 'div' | Semantic element to render. |
| titleClassName | string | — | Extra classes for the headline. |
| descriptionClassName | string | — | Extra classes for the description. |
| eyebrowClassName | string | — | Extra classes for the eyebrow. |
| badgeClassName | string | — | Extra classes for the badge wrapper. |
| mediaClassName | string | — | Extra classes for the media wrapper. |
Anti-patterns
validate_usage is the MCP tool that rejects these mistakes: the same list agents see over MCP and in the canonical markdown.
Don't use Hero as the only page heading twice
A page should have one h1. Use level={2} for a second hero-like band or PageHeader for documentation pages.
tsx// Avoid two h1s<Hero title="Page" /><Hero title="Another page" />Don't hardcode the band color
Wrap Hero in Section and use its tone so child tokens stay readable.
tsx<Section tone="inverse"><Hero title="." /></Section>Don't put busy media behind overlay copy
The overlay scrim protects contrast, but high-detail media still hurts legibility. Use a calm crop and keep copy short.
tsx<Hero variant="overlay" media={<img src="/calm-crop.jpg" alt="" />} title="One short line" />
Accessibility
- Renders h1 by default; use level={2} for a second hero-like band.
- Media is a slot, so the consumer owns alt text and decorative treatment.
- Overlay copy and its scrim invert with the theme, keeping text readable without hardcoded colors.
- Every layout stacks at mobile widths and only splits at lg where there is room.
Content guidelines
Headlines
- Lead with the outcome
- Keep to one sentence
- Highlight at most one phrase
Good examples
- Find your next buyer.
Bad examples
- Welcome to our website
Composition
Compose with Section: Hero sits inside Section; Section owns tone and padding
<Section tone="inverse"><Hero title="." /></Section>
Compose with Button: Put one primary and at most one secondary action in actions
<Hero actions={<><Button>Start</Button><Button variant="outline">Learn more</Button></>} />
Related components: Section, PageHeader, StatBand
Dependencies
What the registry installs alongside this component. Package imports already include these.
npm packages
- class-variance-authority
- clsx
- tailwind-merge
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+: macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA, the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.