Skip to main content

Hero Component

The Hoverkraft theme ships a HoverkraftHero component that encapsulates the branded hero patterns used on the docs and public portal home pages. It combines headline, description, call-to-action buttons, and an optional supporting visual in a responsive layout.

When to use it

  • Landing pages (documentation home, product overviews, release microsites)
  • Section headers that require strong Hoverkraft branding
  • Situations where you want theme-consistent CTAs without hand-rolling markup

Props

PropTypeRequiredDefaultDescription
titleReactNode-Main heading text
descriptionReactNode-Subheading text
eyebrowstring-Small text above title
brandedTextReactNode-Deprecated: use HoverkraftBrandHighlight in title
supportingVisualstring-Path to the supporting image (e.g., img/hero.png)
supportingVisualAltstring""Alt text describing the supporting image
actionsHoverkraftAction[]-Call-to-action buttons
align'left' | 'center''left'Text alignment and grid alignment
tone'midnight' | 'daylight''midnight'Color scheme (dark or light background)
idstring-Optional DOM ID for deep-linking
classNamestring-Extend styling with additional classes

Action Object Structure

Each action in the actions array has the following structure:

PropTypeRequiredDescription
labelstringButton text
tostringInternal route (use for site navigation)
hrefstringExternal URL (use for external links)
variant'primary' | 'secondary' | 'outline'Button style variant
targetstringLink target (e.g., '_blank' for new tab)

Usage

import { HoverkraftHero, HoverkraftBrandHighlight } from "@hoverkraft/docusaurus-theme/components";

Basic

Result
Loading...
Live Editor
<HoverkraftHero
  eyebrow="Introducing"
  title={
    <>
      Hoverkraft Docusaurus <HoverkraftBrandHighlight>Theme</HoverkraftBrandHighlight>
    </>
  }
  description="Opinionated styling, accessible defaults, and production-ready building blocks."
  actions={[{ label: "Get started", to: "/docs/getting-started", variant: "primary" }]}
/>

Midnight tone (center aligned)

Result
Loading...
Live Editor
const actions = [
  { label: "Get started", to: "/docs/getting-started", variant: "primary" },
  { label: "Browse components", to: "/docs/components", variant: "secondary" },
  {
    label: "GitHub",
    href: "https://github.com/hoverkraft-tech",
    variant: "outline",
    target: "_blank",
    rel: "noreferrer",
  },
];

const supportingVisual = "img/home.png";

render(
  <HoverkraftHero
    eyebrow="Introducing"
    title={
      <>
        Hoverkraft Docusaurus <HoverkraftBrandHighlight>Theme</HoverkraftBrandHighlight>
      </>
    }
    description="Opinionated styling, accessible defaults, and production-ready building blocks."
    actions={actions}
    tone="midnight"
    align="center"
    supportingVisual={supportingVisual}
    supportingVisualAlt="Screenshot of Hoverkraft shown in midnight tone"
    id="hero-midnight"
  />
);

Daylight tone (left aligned)

Result
Loading...
Live Editor
const actions = [
  { label: "See examples", to: "/docs/examples", variant: "primary" },
  { label: "Configuration", to: "/docs/configuration", variant: "secondary" },
];

const supportingVisual = "img/home.png";

render(
  <HoverkraftHero
    eyebrow="Docs ready"
    title={
      <>
        Compose faster with <HoverkraftBrandHighlight>Hoverkraft</HoverkraftBrandHighlight>{" "}
        workflows.
      </>
    }
    description="Ship your documentation homepage with polished CTAs and copy blocks in minutes."
    actions={actions}
    tone="daylight"
    align="left"
    supportingVisual={supportingVisual}
    supportingVisualAlt="Screenshot of Hoverkraft shown in daylight tone"
    id="hero-daylight"
  />
);