All blocks
01 · Fluted AmphoraUnglazed stoneware 
02 · Travertine PlinthHoned Roman stone 
03 · Cast Bronze SconcePatinated brass & oak
Gallery Hero
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.
Vela Objects · Autumn Material Study
Objects shaped by clay and light
Wheel-thrown stoneware vessels, honed travertine plinths, and patinated bronze fixtures crafted in quiet small-batch editions.



Install
1npx stylexblocks add gallery-heroSource
components/blocks/ui-sdk/gallery-hero.tsx
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273import * 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> );}
Inspired by the Gallery Hero template from Astryx (MIT License · Copyright (c) 2026 Meta Platforms, Inc.).