Xzero UI
Pro library

Hero section

Three full screen SaaS heroes: a live dashboard rising from the bottom edge over a drifting mesh, a workflow graph that routes sample events node by node, and editorial type over a mesh gradient.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui/hero-section
Live · keyboard ready

Use this as the first section of a landing page and replace the sample copy and data with your own. Events in the workflow preview are simulated.

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui/hero-section

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { HeroSection } from "@/components/xzero/blocks/hero-section/hero-section";

export function Hero() {
  return (
    <HeroSection
      variant="centered"
      primaryAction={{ label: "Start free trial", href: "/sign-up" }}
      secondaryAction={{ label: "Book a demo", href: "/demo" }}
    />
  );
}

API reference

HeroSection

A SaaS landing hero in three designs, each exactly one full screen (100svh) and edge to edge. centered (Screenshot) sets a headline over a drifting mesh gradient that fills the screen, with a live revenue dashboard rising from the bottom edge: the window settles from a tilt as it enters and runs off the screen into a fade. split (Workflow) puts the copy beside a live workflow graph on a dotted canvas: sample Stripe events run node by node, data draws along each edge, the branch decides which actions run, and every step reports its time. minimal (Mesh) is large editorial type over a full mesh gradient with grain, with customer marks along the bottom edge. Pass title to render your own content in any layout instead.

PropTypeDefaultDescription
variant"centered" | "split" | "minimal""centered"Which design to render.
animateInbooleantruePlays the entrance once on mount.
primaryActionHeroAction | null–The main call to action: { label, href?, onClick?, external?, doneLabel? }. With href it renders a link; without, a button that shows doneLabel for a moment after a press.
secondaryActionHeroAction | null–The second call to action, same shape.
titlestring–Your own headline. When set, the hero renders your content (HeroContent) in the chosen layout.
descriptionstring–Your own content: one or two sentences under the title.
announcementHeroAction | null–Your own content: a short link above the title for real news.
install{ label: string; command: string }[] | null–Your own content: the first command is shown with a copy button.
mediaReactNode–Your own content: a visual beside the copy in the split layout.
metastring[]–Your own content: small facts under the actions.
classNamestring–Extra class on the section.

HeroLumen

The Screenshot design on its own. The dashboard is real markup built from Xzero LineChart, Sparkline, SegmentedControl, and Avatar; its range control changes every figure on screen, and the chart can be scrubbed.

PropTypeDefaultDescription
primaryActionHeroAction{ label: "Start free trial", doneLabel: "Trial started" }The main call to action.
secondaryActionHeroAction{ label: "Book a demo" }The second call to action.

HeroRelay

The Workflow design on its own: a Relay workflow (Stripe invoice paid, HubSpot lookup, an amount branch, then Slack, Linear, and warehouse actions) that runs sample events on its own while on screen. Send test event runs the next sample at once; a small invoice skips the Slack and Linear steps.

PropTypeDefaultDescription
primaryActionHeroAction{ label: "Start building", doneLabel: "Workspace created" }The main call to action.
secondaryActionHeroAction{ label: "Read the docs" }The second call to action.

HeroCadence

The Mesh design on its own: type over a mesh gradient, and customer marks drawn in the text color.

PropTypeDefaultDescription
primaryActionHeroAction{ label: "Download for Mac" }The main call to action.

HeroMesh

The background renderer: a lean, non-editing version of the Gradient mesh. Points use the editor's model (x, y, spread); colors come from the CSS variables --mesh-base and --mesh-1 onward, so each theme authors its own palette.

PropTypeDefaultDescription
points{ x: number; y: number; spread: number }[]–Up to eight points, bottom to top.
grainnumber0.35Film grain, 0 to 1.
speednumber1Drift speed; 1 loops every 20 seconds, 0 holds still.

HeroSectionBlock

Default export: the hero full screen with a small glass design switch floating over its top edge; switching replays the entrance.

PropTypeDefaultDescription
variantHeroSectionVariant"centered"Initial design.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Guidance for AI tools

Blocks are complete, self-contained screens with sample data. Replace the sample data and connect the callbacks described above. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://ui.xzero.co.uk/llms.txt

Browse all components