Hero
The first screen of a landing: the promise in the voice, one sentence, the way in, and the product shown working.
import { Hero } from '@sypnia/ui/react'
On night, with the fireflies
Open source, MIT
Every bug leaves a light on.
Sypnia follows it back to where it started: the tap, the page, the call that failed.
Run it yourself for free, or let us run it.
Failing nowCheckout fails for cards from Peru128 people · since 09:12
Code
import { Button, Hero, SiteHeader, Stage, Status } from '@sypnia/ui/react';
export default function Landing() {
return (
<div data-surface="night">
<Hero fireflies
header={<SiteHeader homeHref="#" links={[{ label: 'Product', href: '#' }, { label: 'Pricing', href: '#' }, { label: 'Docs', href: '#' }]} action={<Button variant="primary" size="sm" href="#">Start</Button>} />}
kicker="Open source, MIT"
title="Every bug leaves a light on."
lead="Sypnia follows it back to where it started: the tap, the page, the call that failed."
actions={<><Button variant="primary" size="lg" href="#">Start free</Button><Button variant="quiet" size="lg" href="#">Read the docs</Button></>}
note="Run it yourself for free, or let us run it."
stage={<Stage url="app.sypnia.com/problems/42" float label="A problem in the console"><div className="sy-stack" style={{ '--gap': 'var(--s-2)' } as React.CSSProperties}><Status tone="fail" live>Failing now</Status><strong>Checkout fails for cards from Peru</strong><span className="sy-text--sm sy-text--muted">128 people · since 09:12</span></div></Stage>} />
</div>
);
} When to use it
Use it when
- The top of a landing or a product page.
Do not use it when
- Inside an app.
- Two primary buttons: one way in, one alternative.
For everyone
- Its title is the page's only level 1 heading; the fireflies are hidden; the stage has a name.
Props
| Hero | Type | Default |
|---|---|---|
titlerequiredThe promise, in the voice. The page's only level 1 heading. | ReactNode | |
actionsOne primary button and at most one more. | ReactNode | |
after | ReactNode | |
firefliesThe night field behind it. | boolean | |
headerThe header, inside the hero so it shares its background. | ReactNode | |
kickerA few words above the title, with the lit dot. | ReactNode | |
lead | ReactNode | |
lit | string | |
noteA line under the buttons: what it costs, what it needs. | ReactNode | |
stageThe product shown working, on the other side (a Stage, a Phone). | ReactNode |