Hero

The opening section of a page: headline, supporting text, actions, and optional media beside or below.

Status: beta. Category: Blocks.

import { Hero } from '@glyphui/blocks'

Exports: Hero, heroStyles.

Notes

  • The title is an h1 by default. Set headingLevel when the hero is not the first heading on the page.
  • The section is labeled by its title, so screen readers can jump to it.

Hero props

PropTypeDefaultDescription
title (required)ReactNode
actionsReactNodeButtons or links.
animatebooleantrueEntrance animations as the block scrolls into view. They follow the theme's motion level and the visitor's reduced-motion setting; false turns them off for this block. Default true.
descriptionReactNode
eyebrowReactNodeSmall label above the title, e.g. a Badge announcing a release.
footnoteReactNodeSmall print under the actions, e.g. "No credit card required".
glowbooleantrueSoft glow from the primary color behind the hero. Default true.
headingLevelHeadingLevel1Document outline level of the title. Default 1.
mediaReactNodeScreenshot, illustration or video. Below the text, or beside it with split.
variant"split" | "left" | "centered"centeredcentered (default), left, or split with media beside the text on large screens.

Example: Centered

The default: everything centered over a soft glow from the primary color.

import { Hero } from '@glyphui/blocks'
import { Badge, Button } from '@glyphui/ui'
import { ArrowRight } from 'lucide-react'

export default function Example() {
  return (
    <Hero
      eyebrow={
        <Badge tone="primary" dot>
          New · Usage-based billing
        </Badge>
      }
      title="Invoices that send themselves"
      description="Ledgerline turns usage data into accurate invoices, chases late payments, and syncs everything to your books."
      actions={
        <>
          <Button size="lg" rightIcon={<ArrowRight />}>
            Start free trial
          </Button>
          <Button size="lg" variant="outline">
            Book a demo
          </Button>
        </>
      }
      footnote="14-day trial. No credit card required."
    />
  )
}

Example: Split with media

Text on the left, media on the right on large screens.

import { Hero } from '@glyphui/blocks'
import { Button, Card, Text } from '@glyphui/ui'

export default function Example() {
  return (
    <Hero
      variant="split"
      title="Every on-call shift, calmer"
      description="Pagerline groups related alerts, drafts the incident timeline, and hands off cleanly at the end of the shift."
      actions={<Button size="lg">Try it with your alerts</Button>}
      media={
        <Card className="gap-3">
          <Text size="small" tone="muted">
            Incident #4182 · API latency
          </Text>
          <Text weight="medium">3 alerts grouped · p95 back under 200 ms at 09:41</Text>
          <div className="h-24 rounded-md bg-muted" />
        </Card>
      }
    />
  )
}

Live page: https://glyphui.xyz/components/hero