Dashral Pro is on the wayGet 30% off at launch

Dashral

Split hero

The promise and three reasons beside the product itself: a live dashboard in a browser frame.

$ pnpm dlx shadcn@latest add @dashral/hero-split

When to use

  • The promise and three reasons beside the product itself, a live dashboard in a browser frame.
  • SaaS home pages where seeing the product sells it.

When not to use

  • Products without a screen worth showing yet: Centered hero.
  • Pitches made in results: Stats hero.

Usage

Split hero with your own data: every prop has the sample as its default, so pass only what you have.

example.tsx
import { HeroSplit } from "@/components/dashral/blocks/hero-split"

<HeroSplit
  title="Know your numbers before Monday"
  points={reasons}
  primary={{ label: "Start free", href: "/register" }}
  periods={sampleMetrics}
  currency="EUR"
/>

API reference

HeroSplit

A split hero: the promise, three reasons and the actions on one side; on the other, the product itself — a small live dashboard in a browser frame, where switching the period moves every number. Stacks on phones. Every part comes from props, the preview's numbers too.

PropTypeDefault
eyebrowReact.ReactNodesample
titleReact.ReactNodesample
descriptionReact.ReactNodesample
pointsstring[]sample
primaryBlockActionsample
secondaryBlockAction | null

The second button; null hides it.

sample
addressstring

The preview's address bar.

"app.acme.com/overview"
periodsHeroPeriod[]sample
defaultPeriodstring"month"
currencystring"USD"

type BlockAction

A button: a link with href, or your handler with onClick.

PropTypeDefault
labelstring—
hrefstring—
onClick() => void—

type HeroPeriod

One period the preview can switch to: its figures, their trends and the top pages.

PropTypeDefault
valuestring—
labelstring—
revenuenumber—
revenueChangenumber—
usersnumber—
usersChangenumber—
trendnumber[]—
usersTrendnumber[]—
pages{ label: string; value: number }[]—