Hero
The top of a landing page: an eyebrow chip, a title with an optional muted second line, a description, actions, a copyable install command and an aside for a live demo, side by side or centered by container width, over a token-drawn grid or glow.
Example
Now in beta
Ship the page, not the layout.
Pass the copy, the actions and a live demo; the hero lays them out by its container's width.
Copy code
Any node goes here
LiveInteractive
hero-demo.tsxCopy code
Installation
Copy code
Brings alongcode-block
Usage
ImportCopy code
The first section of a landing page: eyebrow, title and a muted second line, description, actions, an install command and an aside for a live demo.
API reference
Hero
| Prop | Type | Default |
|---|---|---|
eyebrowShown as a chip above the title. | ReactNode | – |
titlerequired | ReactNode | – |
titleMutedA second line of the title, in the muted colour. | ReactNode | – |
titleBreak`false` lets the muted part continue the title's line instead of starting its own. | boolean | true |
description | ReactNode | – |
actions | ReactNode | – |
asideBeside the text on wide containers, below it on narrow ones. | ReactNode | – |
installA shell command, shown in a copyable CodeBlock below the actions. | string | – |
installLabel | string | "Install command" |
align | "start" | "center" | "start" |
decoration`grid` draws faint grid lines that fade out behind the hero; `glow` adds a wash from the link colour. | "grid" | "glow" | "none" | "grid" |
headingLevel | 1 | 2 | 1 |
Also takes <section> attributes except title.
Other exports
type HeroPropsAccessibility
- A section named by its heading (h1 by default, headingLevel for another level).
- The decoration is aria-hidden and drawn with theme tokens, so it follows the palette and mode.
Agent actions
The install command is a CodeBlock with a copy action; actions are whatever controls you pass.
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.