---
title: "Gallery Hero · UI SDK — StyleX Blocks"
description: "Centered marketing hero pairing an eyebrow badge, balanced display headline, editorial copy, dual call-to-action buttons, and a responsive three-column 4:5 architectural and ceramics gallery."
url: "https://stylexblocks.com/block/ui-sdk/gallery-hero/"
agent:
  instructions: "Use this search API to find relevant components and blocks across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://stylexblocks.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Gallery Hero block

Centered marketing hero pairing an eyebrow badge, balanced display headline, editorial copy, dual call-to-action buttons, and a responsive three-column 4:5 architectural and ceramics gallery.

- Behavior engine: UI SDK
- Category: [Marketing](https://stylexblocks.com/blocks/marketing.md)
- Built with: [Aspect Ratio](https://stylexblocks.com/components/ui-sdk/aspect-ratio.md), [Badge](https://stylexblocks.com/components/ui-sdk/badge.md), [Button](https://stylexblocks.com/components/ui-sdk/button.md), [Grid](https://stylexblocks.com/components/ui-sdk/grid.md), [Heading](https://stylexblocks.com/components/ui-sdk/heading.md), [Icon](https://stylexblocks.com/components/ui-sdk/icon.md), [Section](https://stylexblocks.com/components/ui-sdk/section.md), [Stack](https://stylexblocks.com/components/ui-sdk/stack.md), [Text](https://stylexblocks.com/components/ui-sdk/text.md), [Toast](https://stylexblocks.com/components/ui-sdk/toast.md)
- HTML page: https://stylexblocks.com/block/ui-sdk/gallery-hero/

## Install

Configure the project once (sets the behavior engine and import aliases):

```sh
npx stylexblocks init --style ui-sdk
```

Then add the item as source you own:

```sh
npx stylexblocks add gallery-hero
```

Equivalent: `npx shadcn add @stylexblocks/gallery-hero`. Registry item JSON: https://stylexblocks.com/r/ui-sdk/gallery-hero.json

## Usage

```tsx
import { GalleryHero } from "#components/blocks/ui-sdk/gallery-hero.tsx";

export function Example() {
  return (
    <div style={{ minHeight: "100dvh" }}>
      <GalleryHero />
    </div>
  );
}
```

## Source

`components/blocks/ui-sdk/gallery-hero.tsx`

```tsx
import * as stylex from "@stylexjs/stylex";
import { useCallback, useMemo } from "react";
import { AspectRatio } from "#components/ui/ui-sdk/aspect-ratio.tsx";
import { Badge } from "#components/ui/ui-sdk/badge.tsx";
import { Button } from "#components/ui/ui-sdk/button.tsx";
import { Grid } from "#components/ui/ui-sdk/grid.tsx";
import { Heading } from "#components/ui/ui-sdk/heading.tsx";
import { Icon } from "#components/ui/ui-sdk/icon.tsx";
import { Section } from "#components/ui/ui-sdk/section.tsx";
import { HStack, VStack } from "#components/ui/ui-sdk/stack.tsx";
import { Text } from "#components/ui/ui-sdk/text.tsx";
import { Toast, Toaster } from "#components/ui/ui-sdk/toast.tsx";
import { semanticColors } from "@stylexblocks/ui/semantic-tokens/colors.stylex.ts";
import { semanticRadii } from "@stylexblocks/ui/semantic-tokens/radii.stylex.ts";
import { semanticShadows } from "@stylexblocks/ui/semantic-tokens/shadows.stylex.ts";
import { accentPalette } from "@stylexblocks/ui/themes/palettes.ts";
import { durations } from "@stylexblocks/ui/tokens/durations.stylex.ts";
import { fonts } from "@stylexblocks/ui/tokens/fonts.stylex.ts";
import { spacing } from "@stylexblocks/ui/tokens/spacing.stylex.ts";
import type { StyleOverrideProps } from "#lib/recipe-props.ts";

export interface GalleryHeroItem {
  /** Unique identifier for the gallery frame. */
  id: string;
  /** Artwork source URL or data URI rendered inside the 4:5 portrait frame. */
  src: string;
  /** Accessible description for the gallery artwork. */
  alt: string;
  /** Optional short title shown beneath the frame. */
  title?: string;
  /** Optional material or edition note paired with the title. */
  material?: string;
}

const DEFAULT_GALLERY_ITEMS: readonly GalleryHeroItem[] = [
  {
    id: "fluted-amphora",
    src: "/images/blocks/gallery-hero/fluted-amphora.webp",
    alt: "Ribbed unglazed terracotta amphora and matte charcoal stoneware bowl resting inside a sunlit arched plaster alcove",
    title: "01 · Fluted Amphora",
    material: "Unglazed stoneware",
  },
  {
    id: "travertine-plinth",
    src: "/images/blocks/gallery-hero/travertine-plinth.webp",
    alt: "Fluted Roman travertine pedestal supporting a pale celadon sphere beside an arched sunlit limestone colonnade",
    title: "02 · Travertine Plinth",
    material: "Honed Roman stone",
  },
  {
    id: "cast-bronze-sconce",
    src: "/images/blocks/gallery-hero/cast-bronze-sconce.webp",
    alt: "Patinated cast bronze cylindrical wall sconce casting warm light across dark mineral plaster beside smoked oak louvers",
    title: "03 · Cast Bronze Sconce",
    material: "Patinated brass & oak",
  },
];

const styles = stylex.create({
  root: {
    backgroundColor: semanticColors.bg,
    color: semanticColors.fg,
    fontFamily: fonts.body,
    minHeight: "100%",
    paddingBlock: {
      default: spacing._12,
      "@media (max-width: 640px)": spacing._8,
    },
    paddingInline: spacing._6,
    width: "100%",
  },
  content: {
    marginBlock: "auto",
    maxWidth: "75rem",
    width: "100%",
  },
  header: {
    textAlign: "center",
  },
  headline: {
    marginBlock: 0,
    maxWidth: "18ch",
    textAlign: "center",
    textWrap: "balance",
  },
  description: {
    maxWidth: "54ch",
    textWrap: "balance",
  },
  fullWidth: {
    width: "100%",
  },
  figure: {
    marginBlock: 0,
    marginInline: 0,
  },
  frame: {
    backgroundColor: semanticColors.bgMuted,
    borderColor: {
      default: semanticColors.border,
      ":hover": semanticColors.borderEmphasized,
    },
    borderRadius: semanticRadii.panelLg,
    borderStyle: "solid",
    borderWidth: "1px",
    boxShadow: {
      default: semanticShadows.md,
      ":hover": semanticShadows.lg,
    },
    transitionDuration: durations.moderate,
    transitionProperty: "border-color, box-shadow",
  },
  image: {
    display: "block",
    height: "100%",
    objectFit: "cover",
    width: "100%",
  },
  caption: {
    paddingInline: spacing._1,
  },
});

export interface GalleryHeroProps extends StyleOverrideProps {
  /** Optional eyebrow pill displayed above the display headline. */
  eyebrow?: string;
  /** Primary display headline. */
  title?: string;
  /** Supporting editorial copy. */
  description?: string;
  /** Label for the primary call-to-action button. */
  primaryLabel?: string;
  /** Label for the secondary call-to-action button. */
  secondaryLabel?: string;
  /** Curated 4:5 portrait plates rendered in the gallery grid. */
  items?: readonly GalleryHeroItem[];
  /** Called when the primary CTA button is activated. */
  onPrimaryAction?: () => void;
  /** Called when the secondary CTA button is activated. */
  onSecondaryAction?: () => void;
}

/**
 * GalleryHero — centered marketing hero pairing an eyebrow badge, balanced
 * display headline, supporting copy, dual call-to-action buttons, and a
 * responsive multi-frame 4:5 portrait gallery mosaic.
 */
export function GalleryHero({
  eyebrow = "Vela Objects · Autumn Material Study",
  title = "Objects shaped by clay and light",
  description = "Wheel-thrown stoneware vessels, honed travertine plinths, and patinated bronze fixtures crafted in quiet small-batch editions.",
  primaryLabel = "Explore collection",
  secondaryLabel = "Request lookbook",
  items = DEFAULT_GALLERY_ITEMS,
  onPrimaryAction,
  onSecondaryAction,
  palette,
  style,
}: GalleryHeroProps) {
  const queue = useMemo(() => Toast.createToaster(), []);

  const handlePrimary = useCallback(() => {
    onPrimaryAction?.();
    queue.info("Opening the Autumn Material Study…", {
      description: "24 limited stoneware, travertine, and bronze editions available.",
    });
  }, [onPrimaryAction, queue]);

  const handleSecondary = useCallback(() => {
    onSecondaryAction?.();
    queue.info("Autumn lookbook requested", {
      description: "Print-ready edition catalog and finish swatch notes queued.",
    });
  }, [onSecondaryAction, queue]);

  return (
    <VStack align="center" gap="0" palette={palette} style={[styles.root, style]}>
      <VStack render={<main />} gap="10" style={styles.content}>
        <VStack render={<header />} align="center" gap="6" style={styles.header}>
          <VStack align="center" gap="3">
            {eyebrow ? (
              <Badge variant="subtle" size="md">
                {eyebrow}
              </Badge>
            ) : null}
            <Heading render={<h1 />} size="6xl" style={styles.headline}>
              {title}
            </Heading>
            <Text variant="muted" size="lg" align="center" style={styles.description}>
              {description}
            </Text>
          </VStack>

          <HStack wrap="wrap" justify="center" gap="3">
            <Button
              variant="solid"
              size="lg"
              palette={accentPalette}
              onClick={handlePrimary}
            >
              {primaryLabel}
              <Icon
                size="sm"
                viewBox="0 0 20 20"
                fill="none"
                stroke="currentColor"
                strokeWidth="1.75"
                strokeLinecap="round"
                strokeLinejoin="round"
                aria-hidden="true"
              >
                <path d="M4.5 10h11" />
                <path d="M11 5.5 15.5 10 11 14.5" />
              </Icon>
            </Button>
            <Button variant="surface" size="lg" onClick={handleSecondary}>
              {secondaryLabel}
            </Button>
          </HStack>
        </VStack>

        <Section.Root
          aria-label="Autumn material study gallery"
          style={styles.fullWidth}
        >
          <Section.Body>
            <Grid columns="autoFit" gap="4" style={styles.fullWidth}>
              {items.map((item) => (
                <VStack
                  render={<figure />}
                  key={item.id}
                  gap="2.5"
                  style={styles.figure}
                >
                  <AspectRatio ratio="4/5" rounded="lg" style={styles.frame}>
                    <img
                      src={item.src}
                      alt={item.alt}
                      {...stylex.props(styles.image)}
                    />
                  </AspectRatio>
                  {item.title || item.material ? (
                    <HStack
                      render={<figcaption />}
                      align="baseline"
                      justify="between"
                      gap="2"
                      style={styles.caption}
                    >
                      {item.title ? (
                        <Text render={<span />} size="sm" weight="medium">
                          {item.title}
                        </Text>
                      ) : null}
                      {item.material ? (
                        <Text render={<span />} variant="caption">
                          {item.material}
                        </Text>
                      ) : null}
                    </HStack>
                  ) : null}
                </VStack>
              ))}
            </Grid>
          </Section.Body>
        </Section.Root>
      </VStack>

      <Toaster toaster={queue} />
    </VStack>
  );
}
```

Credit: Inspired by [Gallery Hero](https://astryx.atmeta.com/playground?template=gallery-hero) from Astryx (MIT License · Copyright (c) 2026 Meta Platforms, Inc.)
