import { Hero } from "@pixxl-tools/components";
// In Server Components:
import { Hero } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
title (required) | ReactNode | — | Title (any content). |
actions | ReactNode | — | Further calls to action (buttons / links), after the preset ones. |
eyebrow | ReactNode | — | Small label above the title. |
lead | ReactNode | — | Lead paragraph below the title. |
media | ReactNode | — | Image, screenshot, demo — beside (start) or below (center) the text. |
align | "center" | "start" | start | start (default; media beside the text from lg) or center. |
headingAs | HeadingElement | h1 | Heading element (default h1). |
primaryAction | HeroAction | — | The main call to action: a solid primary ActionLink, size md. |
secondaryAction | HeroAction | — | The second call to action: an outline neutral ActionLink, size md. |
size | "lg" | "md" | "xl" | lg | Display size of the title (default lg). |
titlerequiredReactNode
Title (any content).
actionsReactNode
Further calls to action (buttons / links), after the preset ones.
eyebrowReactNode
Small label above the title.
leadReactNode
Lead paragraph below the title.
mediaReactNode
Image, screenshot, demo — beside (start) or below (center) the text.
aligndefault start"center" | "start"
start (default; media beside the text from lg) or center.
headingAsdefault h1HeadingElement
Heading element (default h1).
primaryActionHeroAction
The main call to action: a solid primary ActionLink, size md.
secondaryActionHeroAction
The second call to action: an outline neutral ActionLink, size md.
sizedefault lg"lg" | "md" | "xl"
Display size of the title (default lg).
Other props are passed to the root element (HTMLAttributes<HTMLElement>), including className, style, id and aria-* attributes.
Pixxl 0.3
Tokens, layers and accessible components.
Complex object props use fixed fixtures. Primitive props stay editable.
<Hero eyebrow="Pixxl 0.3" title="Build sites from one shell" lead="Tokens, layers and accessible components." actions={<Button tone="primary" variant="solid">Get started</Button>} />Open source
Accessible React components with one shared look and a per-site accent.
<Hero eyebrow="Open source" title="Build consistent sites faster" lead="Accessible React components with one shared look and a per-site accent." actions={<ActionLink href="/start">Get started</ActionLink>} media={<img alt="" src="/images/hero.png" />} />Pixxl 0.3
Tokens, layers and accessible components.
<Hero eyebrow="Pixxl 0.3" title="Build sites from one shell" lead="Tokens, layers and accessible components." actions={<Button tone="primary" variant="solid">Get started</Button>} />