The first screen of a landing page in five layouts. Plain by default: a headline, one line of support and your actions. The eyebrow, facts, command chip and background are opt-in. Centered is Free; Split, Product shot and Statement are Pro variants that build on it.
On this page
- Landing page opener
- Product launch headline
- Install command promo
- Changelog announcement
- Docs home banner
Examples
Left-aligned with factsFree
Split with mediaPro
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Product shotPro
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
StatementPro
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Statement, centredPro
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Statement, text onlyPro
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Installation
npx knowns-ui@latest add heroPaste this into your coding agent (Claude Code, Cursor, Codex). It checks your project, sets up the registry, runs the install and verifies it.
Install Hero from Knowns UI into this project. Work step by step, show me each change, and ask before you edit files outside this project.
Context: Knowns UI (https://ui.knowns.dev) is a shadcn registry. Items land in the project as source files. Docs: https://ui.knowns.dev/docs/hero
1. Check the project first. Stop and tell me if any of these is missing:
- React 19 and Tailwind CSS v4.
- A components.json at the project root. If there is none, ask me before running `npx knowns-ui@latest init --no-key` (it runs shadcn init when needed, then adds the registries).
2. Run:
```bash
npx knowns-ui@latest add hero
```
It writes these files:
- lib/knowns/run.ts
- lib/knowns/json.tsx
- lib/knowns/status.ts
- lib/knowns/tone.ts
- lib/knowns/types.ts
- lib/knowns/use-abortable.ts
- lib/knowns/utils.ts
- lib/knowns/motion.tsx
- lib/knowns/motion-utils.ts
- components/ui/knowns/use-floating.ts
- components/ui/knowns/tooltip.tsx
- components/ui/knowns/tooltip-utils.ts
- components/ui/knowns/avatar.tsx
- components/ui/knowns/spinner.tsx
- components/ui/knowns/button.tsx
- components/ui/knowns/illustrations/illust-utils.ts
- components/ui/knowns/illustrations/use-in-view.ts
- components/ui/knowns/marquee/marquee.tsx
- components/ui/knowns/marquee/marquee-utils.ts
- components/ui/knowns/blocks/marketing/section-heading.tsx
- components/ui/knowns/blocks/marketing/marketing-utils.ts
- components/ui/knowns/text-animation/text-core.tsx
- components/ui/knowns/text-animation/word-rotate.tsx
- components/ui/knowns/blocks/marketing/hero.tsx
and installs these npm packages: clsx@^2.1.1, tailwind-merge@^3.7.0, class-variance-authority@^0.7.1.
3. While it runs:
- It also adds a few @keyframes (all named kn-*) to the global CSS file (globals.css or the file components.json points at). Let it: they only add animations.
- If it asks to overwrite files under lib/knowns/: these are shared by every Knowns UI item. List them, say whether I changed them (check git), and ask me before you answer.
- If it asks to overwrite any other file, show me the diff and ask me.
4. Verify:
- Every file in the list above exists.
- The project type-checks (for example `npx tsc --noEmit`) and the dev build has no new errors.
5. Use it: follow the examples and props on https://ui.knowns.dev/docs/hero, and ask me if anything about my data is unclear.
If the Knowns UI MCP server is connected (https://ui.knowns.dev/docs/ai-and-mcp), use get_component({ name: "hero" }) or search_docs for details.
Finish with a short summary: the files you added or changed, the packages you installed, and anything I still need to do.- title / lead
ReactNode- The headline (48 / 56 / 64px) and one or two sentences under it.
- primary / secondary
{ label, href?, onClick?, external? }- A primary button and a quiet text link with an arrow.
- eyebrow
{ label, href?, badge? }- Opt-in line above the headline. badge is one word in the accent colour, e.g. New.
- proof
{ value, label, avatars? }|null- Opt-in: one small line right under the actions, a real count and what it counts. Pass null until the number is worth showing: nothing renders and no space is kept.
- proof.avatars
string[]- Image URLs for 4 or 5 overlapping faces before the number. Decoration only: hidden from screen readers, no names, no hover, no +N (the number already says it).
- facts
{ value, label }[]- Opt-in: up to 4 short facts under a hairline.
- command
string- Opt-in: an install command in a chip with a Copy button. A leading $ is not copied.
- rotate
string[]- Opt-in: words that rotate at the end of the headline. Their width is reserved, so the line does not jump.
- as
"h1"|"h2"|"h3"- Default
"h1" - Heading level of the headline. A page has one h1; use h2 when the hero is a demo or not the first section.
- background
ReactNode- Opt-in: one of our Backgrounds behind the section. Plain by default.
| Prop | Type | Default | Description |
|---|---|---|---|
| title / lead | ReactNode | - | The headline (48 / 56 / 64px) and one or two sentences under it. |
| primary / secondary | { label, href?, onClick?, external? } | - | A primary button and a quiet text link with an arrow. |
| eyebrow | { label, href?, badge? } | - | Opt-in line above the headline. badge is one word in the accent colour, e.g. New. |
| proof | { value, label, avatars? } | null | - | Opt-in: one small line right under the actions, a real count and what it counts. Pass null until the number is worth showing: nothing renders and no space is kept. |
| proof.avatars | string[] | - | Image URLs for 4 or 5 overlapping faces before the number. Decoration only: hidden from screen readers, no names, no hover, no +N (the number already says it). |
| facts | { value, label }[] | - | Opt-in: up to 4 short facts under a hairline. |
| command | string | - | Opt-in: an install command in a chip with a Copy button. A leading $ is not copied. |
| rotate | string[] | - | Opt-in: words that rotate at the end of the headline. Their width is reserved, so the line does not jump. |
| as | "h1" | "h2" | "h3" | "h1" | Heading level of the headline. A page has one h1; use h2 when the hero is a demo or not the first section. |
| background | ReactNode | - | Opt-in: one of our Backgrounds behind the section. Plain by default. |
- align
"center"|"start"- Default
"center" - HeroCentered: centred, or left-aligned.
- media
ReactNode|MediaFrameProps- HeroSplit and HeroProduct: live content, or { src, srcDark?, alt, aspect?, video?: { src, poster } } in a fixed-aspect frame. Images load lazily; a video loads on Play.
- mediaSide / footnote
"left"|"right" / ReactNode- Default
"right" - HeroSplit: the side of the media from 1024px, and small print under the actions.
- tilt / glow / aspect
number / string / string- Default
10 / - / "16/10" - HeroProduct: degrees of tilt before the shot scrolls flat (0 or reduced motion keeps it flat), an opt-in glow colour, and the frame's aspect.
- bleed
boolean- Default
true - HeroProduct: the frame runs to the bottom edge of the section and is cropped there. false puts padding below it.
- children
ReactNode- HeroCentered: anything under the actions, such as a screenshot or a Logo Cloud. HeroStatement: under the strip.
- align
"start"|"center"- Default
"start" - HeroStatement: where the text, buttons and install line sit. Start-aligned, the strip runs off the right edge; centred, it shows three cards in the column.
- strip
"on"|"off"- Default
"on" - HeroStatement: a row of real components (a thinking step, an approval, a context window, an uptime bar) under the text. They tell one story and hold still. off keeps the text block alone.
- cards
{ id, label?, node, bare? }[]- HeroStatement: your own components for the strip. bare skips the card frame for components that bring their own.
| Prop | Type | Default | Description |
|---|---|---|---|
| align | "center" | "start" | "center" | HeroCentered: centred, or left-aligned. |
| media | ReactNode | MediaFrameProps | - | HeroSplit and HeroProduct: live content, or { src, srcDark?, alt, aspect?, video?: { src, poster } } in a fixed-aspect frame. Images load lazily; a video loads on Play. |
| mediaSide / footnote | "left" | "right" / ReactNode | "right" | HeroSplit: the side of the media from 1024px, and small print under the actions. |
| tilt / glow / aspect | number / string / string | 10 / - / "16/10" | HeroProduct: degrees of tilt before the shot scrolls flat (0 or reduced motion keeps it flat), an opt-in glow colour, and the frame's aspect. |
| bleed | boolean | true | HeroProduct: the frame runs to the bottom edge of the section and is cropped there. false puts padding below it. |
| children | ReactNode | - | HeroCentered: anything under the actions, such as a screenshot or a Logo Cloud. HeroStatement: under the strip. |
| align | "start" | "center" | "start" | HeroStatement: where the text, buttons and install line sit. Start-aligned, the strip runs off the right edge; centred, it shows three cards in the column. |
| strip | "on" | "off" | "on" | HeroStatement: a row of real components (a thinking step, an approval, a context window, an uptime bar) under the text. They tell one story and hold still. off keeps the text block alone. |
| cards | { id, label?, node, bare? }[] | - | HeroStatement: your own components for the strip. bare skips the card frame for components that bring their own. |
Use one hero per page: it holds the page's only h1. Frames keep their size before media loads, so nothing shifts. Pick the layout by what you can show: no screenshot, use Centered or Statement; one strong screenshot, use Product shot; a short loop or a form, use Split.
What it handles
- 01Centres the headline, lead and actions, or left-aligns them with align="start", and sizes the headline at 48, 56 and 64px across the breakpoints.
- 02Adds the pieces only when you give them: an eyebrow with a badge word and optional link, up to four facts under the actions, and a figure above the eyebrow.
- 03Shows the first word of `rotate` still, and cycles through the list only when you set `rotateAuto`, because a headline that keeps changing is read less.
- 04Renders `command` in a chip with a Copy button that writes to the clipboard, calls `onCommandCopy` and reads Copied for about a second and a half.
- 05Types through `commandCycle` names one character at a time, pauses on hover, focus and a hidden tab, and shows one static command to the server and to reduced motion.
- 06Sets the vertical padding with `spacing` (default, tight or snug) and lays a Backdrop slot behind everything for one of the Backgrounds.
States
- First render
- Nothing. The headline, command and facts paint as they are
- none
- Hover the eyebrow link
- The arrow turns from muted to full colour
- 120ms, ease out
- Hover the secondary action
- The arrow turns from muted to full colour
- 120ms, ease out
- Hover the copy button
- Background and colour change
- 120ms, ease out
- Command copied
- The copy icon swaps for a check that pops in
- 180ms, ease out
- Reduced motion
- The check shows without the pop; the typing command and rotating word stay still
- 0ms
| State | What moves | Timing |
|---|---|---|
| First render | Nothing. The headline, command and facts paint as they are | none |
| Hover the eyebrow link | The arrow turns from muted to full colour | 120ms, ease out |
| Hover the secondary action | The arrow turns from muted to full colour | 120ms, ease out |
| Hover the copy button | Background and colour change | 120ms, ease out |
| Command copied | The copy icon swaps for a check that pops in | 180ms, ease out |
| Reduced motion | The check shows without the pop; the typing command and rotating word stay still | 0ms |
Works with
When to use
When to use
- The first screen of a landing page: one headline, a line of support and the main call to action.
- Product launches that show the app itself: a large framed shot or a live demo under the headline.
When not to use
- The title row of an app screen: use Page Header.
- Second and later sections on a page: use one hero, then section blocks: use Feature Split.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Hero to my app and wire it to my own data.
- I need the first screen of a landing page: one headline, a line of support and the main call to action. Set that up with the Knowns UI Hero.
- Which Hero props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "hero" }) and search_docs({ query: "hero" }).