Hero

A page's opening band and its one h1: a headline, a line about the product and calls to action, centred or beside a picture, here large with the base title size and one action.

Eyebrow

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import type { BlockAction } from "@produkto/ui/Section";

const actions: BlockAction[] = [{ label: "Primary action", link: "#" }];

const Example = () => (
  <Hero
    actions={actions}
    description="A short line about what the product does goes here."
    eyebrow="Eyebrow"
    size="lg"
    title="Your headline goes here"
    titleSize="base"
  />
);

export default Example;

Usage

import { Hero } from "@produkto/ui/Hero";
import type { BlockAction } from "@produkto/ui/Section";
const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#" },
];

<Hero
  eyebrow="Eyebrow"
  title="Your headline goes here"
  description="A short line about what the product does goes here."
  actions={actions}
/>

Examples

Centred over a photo

media sets one wide picture under the centred words.

Eyebrow

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import type { BlockAction } from "@produkto/ui/Section";
import { Image } from "@produkto/ui/Image";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#" },
];

const Example = () => (
  <Hero
    actions={actions}
    media={
      <Image
        alt=""
        className="aspect-video w-full rounded-2xl object-cover"
        src="https://picsum.photos/id/1018/1600/900"
      />
    }
    description="A short line about what the product does goes here."
    eyebrow="Eyebrow"
    title="Your headline goes here"
  />
);

export default Example;

Words split over a photo

layout="start" sets the title on the left and the line and buttons on the right, with media one wide picture under them.

Eyebrow

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import type { BlockAction } from "@produkto/ui/Section";
import { Image } from "@produkto/ui/Image";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#" },
];

const Example = () => (
  <Hero
    actions={actions}
    layout="start"
    media={
      <Image
        alt=""
        className="aspect-video w-full rounded-2xl object-cover"
        src="https://picsum.photos/id/1043/1600/900"
      />
    }
    description="A short line about what the product does goes here."
    eyebrow="Eyebrow"
    title="Your headline goes here"
  />
);

export default Example;

Words alone

size="lg" sets the headline larger and gives the band more room above it, for a landing page's first screen.

Eyebrow

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import type { BlockAction } from "@produkto/ui/Section";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#section" },
];

const Example = () => (
  <Hero
    actions={actions}
    description="A short line about what the product does goes here."
    eyebrow="Eyebrow"
    size="lg"
    title="Your headline goes here"
  />
);

export default Example;

Photo right

layout="split" sets the text beside the media on large screens, and above it on small ones.

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import { Image01Icon } from "@hugeicons/core-free-icons";
import { Icon } from "@produkto/ui/Icon";
import type { BlockAction } from "@produkto/ui/Section";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#section" },
];

const Example = () => (
  <Hero
    actions={actions}
    description="A short line about what the product does goes here."
    layout="split"
    media={
      <div className="flex aspect-4/3 items-center justify-center rounded-2xl border border-border bg-muted text-muted-foreground">
        <Icon icon={Image01Icon} size={32} />
      </div>
    }
    title="Your headline goes here"
  />
);

export default Example;

Photo left

mediaFirst sets the picture before the words when layout="split" lays them side by side.

Eyebrow

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import type { BlockAction } from "@produkto/ui/Section";
import { Image } from "@produkto/ui/Image";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#" },
];

const Example = () => (
  <Hero
    actions={actions}
    layout="split"
    media={
      <Image
        alt=""
        className="aspect-4/3 w-full rounded-2xl object-cover"
        src="https://picsum.photos/id/1059/1200/900"
      />
    }
    mediaFirst
    description="A short line about what the product does goes here."
    eyebrow="Eyebrow"
    title="Your headline goes here"
  />
);

export default Example;

Cinema

cover fills the band with its backdrop photo under a dark scrim in the dark theme, and place="foot" sets the words at its foot.

Eyebrow

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import type { BlockAction } from "@produkto/ui/Section";
import { Image } from "@produkto/ui/Image";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#" },
];

const Example = () => (
  <Hero
    actions={actions}
    backdrop={<Image alt="" src="https://picsum.photos/id/1036/1920/1080" />}
    cover
    layout="split"
    place="foot"
    description="A short line about what the product does goes here."
    eyebrow="Eyebrow"
    title="Your headline goes here"
  />
);

export default Example;

Cinema, words split

With cover and place="foot", layout="start" sets the title at the foot on the left and the line and buttons on the right.

Eyebrow

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import type { BlockAction } from "@produkto/ui/Section";
import { Image } from "@produkto/ui/Image";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#" },
];

const Example = () => (
  <Hero
    actions={actions}
    backdrop={<Image alt="" src="https://picsum.photos/id/1039/1920/1080" />}
    cover
    layout="start"
    place="foot"
    description="A short line about what the product does goes here."
    eyebrow="Eyebrow"
    title="Your headline goes here"
  />
);

export default Example;

Framed photo

framed sets the covered backdrop in a rounded panel inside the page, the words over it.

Eyebrow

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import type { BlockAction } from "@produkto/ui/Section";
import { Image } from "@produkto/ui/Image";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#" },
];

const Example = () => (
  <Hero
    actions={actions}
    backdrop={<Image alt="" src="https://picsum.photos/id/1040/1920/1080" />}
    cover
    framed
    description="A short line about what the product does goes here."
    eyebrow="Eyebrow"
    title="Your headline goes here"
  />
);

export default Example;

Film behind

cover with a Video of mode="ground" as its backdrop loops a muted film behind the words, its pause button at the foot.

Eyebrow

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import type { BlockAction } from "@produkto/ui/Section";
import { Video } from "@produkto/ui/Video";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#", appearance: "outline" },
];

const Example = () => (
  <Hero
    actions={actions}
    backdrop={
      <Video
        alt=""
        mode="ground"
        poster="https://picsum.photos/id/106/1600/900"
        src="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
      />
    }
    cover
    description="A short line about what the product does goes here."
    eyebrow="Eyebrow"
    title="Your headline goes here"
  />
);

export default Example;

Full screen

With cover, height="screen" makes the photo as tall as the screen under the Navbar, the words in its middle.

Eyebrow

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import type { BlockAction } from "@produkto/ui/Section";
import { Image } from "@produkto/ui/Image";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#" },
];

const Example = () => (
  <Hero
    actions={actions}
    backdrop={<Image alt="" src="https://picsum.photos/id/1044/1920/1080" />}
    cover
    height="screen"
    description="A short line about what the product does goes here."
    eyebrow="Eyebrow"
    title="Your headline goes here"
  />
);

export default Example;

Film that opens large

A Video of mode="large" as the media shows the film's still with a play button that opens the film over the page.

Eyebrow

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import type { BlockAction } from "@produkto/ui/Section";
import { Video } from "@produkto/ui/Video";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#", appearance: "outline" },
];

const Example = () => (
  <Hero
    actions={actions}
    description="A short line about what the product does goes here."
    eyebrow="Eyebrow"
    layout="split"
    media={
      <Video
        alt=""
        mode="large"
        poster="https://picsum.photos/id/1056/1200/900"
        src="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
      />
    }
    title="Your headline goes here"
  />
);

export default Example;

With three cards

media can be three cards under the words, such as the catalogue's best items.

Eyebrow

Your headline goes here

A short line about what the product does goes here.

Item 1
A short line about it goes here.
Item 2
A short line about it goes here.
Item 3
A short line about it goes here.
import { Hero } from "@produkto/ui/Hero";
import type { BlockAction } from "@produkto/ui/Section";
import {
  Card,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@produkto/ui/Card";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#" },
];
const cards = [1, 2, 3];

const Example = () => (
  <Hero
    actions={actions}
    media={
      <div className="grid gap-4 text-start sm:grid-cols-3">
        {cards.map((n) => (
          <Card key={n}>
            <CardHeader>
              <CardTitle>{`Item ${n}`}</CardTitle>
              <CardDescription>
                A short line about it goes here.
              </CardDescription>
            </CardHeader>
          </Card>
        ))}
      </div>
    }
    description="A short line about what the product does goes here."
    eyebrow="Eyebrow"
    title="Your headline goes here"
  />
);

export default Example;

Moving photo columns

The words beside two columns of photos, each a vertical Marquee, one drifting up and the other down.

Eyebrow

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import { Image } from "@produkto/ui/Image";
import { Marquee } from "@produkto/ui/Marquee";
import type { BlockAction } from "@produkto/ui/Section";

const actions: BlockAction[] = [{ label: "Primary action", link: "#" }];

const column = (ids: number[]) =>
  ids.map((id) => (
    <Image
      key={id}
      alt=""
      className="aspect-4/5 w-full rounded-2xl object-cover"
      src={`https://picsum.photos/id/${id}/600/750`}
    />
  ));

const Example = () => (
  <Hero
    actions={actions}
    description="A short line about what the product does goes here."
    eyebrow="Eyebrow"
    layout="split"
    media={
      <div className="grid h-[32rem] grid-cols-2 gap-3">
        <Marquee duration={40000} orientation="vertical">
          {column([1061, 1062, 1063])}
        </Marquee>
        <Marquee duration={40000} reverse orientation="vertical">
          {column([1064, 1065, 1066])}
        </Marquee>
      </div>
    }
    title="Your headline goes here"
  />
);

export default Example;

Moving photo row

media can be the kit's Marquee, a row of pictures under the words that never stops.

Eyebrow

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import type { BlockAction } from "@produkto/ui/Section";
import { Image } from "@produkto/ui/Image";
import { Marquee } from "@produkto/ui/Marquee";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#" },
];
const photos = [1011, 1012, 1013, 1014, 1015, 1016];

const Example = () => (
  <Hero
    actions={actions}
    media={
      <Marquee>
        {photos.map((id) => (
          <Image
            alt=""
            className="aspect-4/3 w-60 shrink-0 rounded-2xl object-cover"
            key={id}
            src={`https://picsum.photos/id/${id}/800/600`}
          />
        ))}
      </Marquee>
    }
    description="A short line about what the product does goes here."
    eyebrow="Eyebrow"
    title="Your headline goes here"
  />
);

export default Example;

Full height

height="screen" makes the band at least as tall as the screen under the Navbar (--navbar-height), centres its content up and down between the 64px every section has above and below, at every width, for a page that opens on the hero.

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import type { BlockAction } from "@produkto/ui/Section";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#section" },
];

const Example = () => (
  <Hero
    actions={actions}
    description="A short line about what the product does goes here."
    height="screen"
    size="lg"
    title="Your headline goes here"
  />
);

export default Example;

Title at the start

layout="start" sets the title at the start with its description and actions beside it on large screens, and the media below at full width.

Eyebrow

Your headline goes here. And a quieter line after it.

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import { Image01Icon } from "@hugeicons/core-free-icons";
import { Icon } from "@produkto/ui/Icon";
import type { BlockAction } from "@produkto/ui/Section";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#section" },
];

const Example = () => (
  <Hero
    actions={actions}
    description="A short line about what the product does goes here."
    eyebrow="Eyebrow"
    layout="start"
    media={
      <div className="flex aspect-video items-center justify-center rounded-2xl border border-border bg-muted text-muted-foreground">
        <Icon icon={Image01Icon} size={32} />
      </div>
    }
    tagline="And a quieter line after it."
    title="Your headline goes here."
  />
);

export default Example;

With a list

FeatureCards as the media opens the page on its list: the headline names it and the cards follow 40px under the text.

Your headline goes here

A short line about what the list holds goes here.

  • Item 1

  • Item 2

  • Item 3

  • Item 4

  • Item 5

  • Item 6

import { Hero } from "@produkto/ui/Hero";
import { FeatureCards, type FeatureItem } from "@produkto/ui/Features";
import type { BlockAction } from "@produkto/ui/Section";

const actions: BlockAction[] = [{ label: "Primary action", link: "#" }];

const items: FeatureItem[] = [
  "Item 1",
  "Item 2",
  "Item 3",
  "Item 4",
  "Item 5",
  "Item 6",
].map((item) => ({ title: item }));

const Example = () => (
  <Hero
    actions={actions}
    description="A short line about what the list holds goes here."
    media={
      <FeatureCards
        appearance="soft"
        items={items}
        orientation="horizontal"
        size="sm"
      />
    }
    title="Your headline goes here"
  />
);

export default Example;

With an announcement

announcement puts a small link above the headline; an eyebrow given with it sits inside as its badge.

NewAn announcement goes here

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import type { BlockAction, BlockLink } from "@produkto/ui/Section";

const announcement: BlockLink = {
  label: "An announcement goes here",
  link: "#",
};

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#section" },
];

const Example = () => (
  <Hero
    actions={actions}
    announcement={announcement}
    description="A short line about what the product does goes here."
    eyebrow="New"
    title="Your headline goes here"
  />
);

export default Example;

Muted

muted lays the hero on the muted background; centred, the media sits under the text.

Your headline goes here

A short line about what the product does goes here.

import { Hero } from "@produkto/ui/Hero";
import { Image01Icon } from "@hugeicons/core-free-icons";
import { Icon } from "@produkto/ui/Icon";
import type { BlockAction } from "@produkto/ui/Section";

const actions: BlockAction[] = [
  { label: "Primary action", link: "#" },
  { label: "Secondary action", link: "#section" },
];

const Example = () => (
  <Hero
    actions={actions}
    description="A short line about what the product does goes here."
    media={
      <div className="flex aspect-video items-center justify-center rounded-2xl border border-border bg-card text-muted-foreground">
        <Icon icon={Image01Icon} size={32} />
      </div>
    }
    muted
    title="Your headline goes here"
  />
);

export default Example;

Page header

The top of an inner page: the eyebrow, the title and one line, set at the start on the muted band.

Eyebrow

Your headline goes here

A short line about what this page lists.

import { Hero } from "@produkto/ui/Hero";

const Example = () => (
  <Hero
    description="A short line about what this page lists."
    eyebrow="Eyebrow"
    layout="split"
    muted
    title="Your headline goes here"
  />
);

export default Example;

Page header centred

The same words on one centred axis.

Eyebrow

Your headline goes here

A short line about what this page lists.

import { Hero } from "@produkto/ui/Hero";

const Example = () => (
  <Hero
    description="A short line about what this page lists."
    eyebrow="Eyebrow"
    muted
    title="Your headline goes here"
  />
);

export default Example;

Page header with a photo

layout="split" with media sets the words beside one picture.

Eyebrow

Your headline goes here

A short line about what this page lists.

import { Hero } from "@produkto/ui/Hero";
import { Image } from "@produkto/ui/Image";

const Example = () => (
  <Hero
    description="A short line about what this page lists."
    eyebrow="Eyebrow"
    layout="split"
    media={
      <Image
        alt=""
        className="aspect-4/3 w-full rounded-2xl object-cover"
        src="https://picsum.photos/id/1031/1200/900"
      />
    }
    title="Your headline goes here"
  />
);

export default Example;

Page header over a photo

cover sets the words over a photo band under a dark scrim, here held to a band's height with className.

Eyebrow

Your headline goes here

A short line about what this page lists.

import { Hero } from "@produkto/ui/Hero";
import { Image } from "@produkto/ui/Image";

const Example = () => (
  <Hero
    description="A short line about what this page lists."
    eyebrow="Eyebrow"
    backdrop={<Image alt="" src="https://picsum.photos/id/1033/1920/800" />}
    className="min-h-96"
    cover
    layout="split"
    place="foot"
    title="Your headline goes here"
  />
);

export default Example;

API Reference

Hero

HeroProps · blocks/Hero/Hero.types.ts
PropTypeDefault
idstring-
eyebrowstring-
breadcrumbsBreadcrumbTrailItem[]-
announcementBlockLink-
titleReactNode-
taglineReactNode-
descriptionReactNode-
actionsBlockAction[]-
noteReactNode-
mediaReactNode-
backdropReactNode-
coverbooleanfalse
framedbooleanfalse
placeHeroPlace"middle" | "foot""middle"
mediaFirstbooleanfalse
layoutHeroLayout"center" | "split" | "start" | "stacked""center"
sizeHeroSize"base" | "lg""base"
titleSizeHeroSize"base" | "lg"size
heightHeroHeight"auto" | "screen""auto"
mutedbooleanfalse
classNamestring-
childrenReactNode-

BreadcrumbTrailItem

used by breadcrumbs
PropTypeDefault
labelrequiredstring-
linkstring-

BlockLink

used by announcement
PropTypeDefault
labelrequiredstring-
linkrequiredstring-

BlockAction

used by actions
PropTypeDefault
appearanceButtonAppearance"solid" | "soft" | "outline" | "transparent"-
toneButtonTone"neutral" | "accent" | "destructive" | "success" | "warning" | "info"-
iconReactNode-
iconOnlyboolean-
borderRadiusBlockActionBorderRadius"none" | "xs" | "sm" | "base" | "lg" | "xl" | "full"-
labelrequiredstring-
linkrequiredstring-