All blocks
Mixed Gallery
Asymmetric mixed-aspect bento gallery pairing panoramic wide plates, tall portrait specimens, and square studies with a segmented discipline filter and keyboard-navigable lightbox dialog.
Built withBadgeButtonCenterDialogGridHeadingIconIcon ButtonKbdSectionSegment GroupSeparatorStackText
Studio Forma · Material & Print Archive
Tactile studies in pigment, weave, and press
Eight archival specimen plates pairing risograph overprints, raw linen weaves, reduction-fired glazes, and hand-sewn paper dummies across mixed aspect ratios.
Install
1npx stylexblocks add mixed-gallerySource
components/blocks/ui-sdk/mixed-gallery.tsx
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033import * as stylex from "@stylexjs/stylex";import { useCallback, useEffect, useMemo, useState } from "react";import { Badge } from "#components/ui/ui-sdk/badge.tsx";import { Button } from "#components/ui/ui-sdk/button.tsx";import { Center, Circle } from "#components/ui/ui-sdk/center.tsx";import { Dialog } from "#components/ui/ui-sdk/dialog.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 { IconButton } from "#components/ui/ui-sdk/icon-button.tsx";import { Kbd } from "#components/ui/ui-sdk/kbd.tsx";import { Section } from "#components/ui/ui-sdk/section.tsx";import { SegmentGroup } from "#components/ui/ui-sdk/segment-group.tsx";import { Separator } from "#components/ui/ui-sdk/separator.tsx";import { HStack, VStack } from "#components/ui/ui-sdk/stack.tsx";import { Text } from "#components/ui/ui-sdk/text.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 { durations } from "@stylexblocks/ui/tokens/durations.stylex.ts";import { fonts } from "@stylexblocks/ui/tokens/fonts.stylex.ts";import { lineHeights } from "@stylexblocks/ui/tokens/line-heights.stylex.ts";import { spacing } from "@stylexblocks/ui/tokens/spacing.stylex.ts";import type { StyleOverrideProps } from "#lib/recipe-props.ts";
export type MixedGalleryCategory = "all" | "print" | "materials" | "editions";
export type MixedGalleryFormat = "wide" | "portrait" | "square";
export interface MixedGalleryItem { id: string; plate: string; title: string; category: Exclude<MixedGalleryCategory, "all">; categoryLabel: string; format: MixedGalleryFormat; formatLabel: string; medium: string; stock: string; dimensions: string; edition: string; year: string; notes: string; src: string; alt: string;}
const DEFAULT_GALLERY_ITEMS: ReadonlyArray<MixedGalleryItem> = [ { id: "vermilion-indigo-overprint", plate: "FM-01", title: "Vermilion & Indigo Overprint Sheet", category: "print", categoryLabel: "Print", format: "wide", formatLabel: "Wide 2:1", medium: "Two-drum risograph proof", stock: "Munken Lynx 240 gsm cotton rag", dimensions: "420 × 210 mm", edition: "Edition of 80 · Proof #14", year: "2025", notes: "Registration press sheet studying soy-ink transparency where bright vermilion arches overlap deep cobalt halftone fields to yield plum tertiary tones.", src: "/images/blocks/mixed-gallery/vermilion-indigo-overprint.webp", alt: "Wide risograph overprint proof sheet with vermilion circles and deep indigo arches intersecting on archival cream paper with registration marks", }, { id: "belgian-linen-weave", plate: "FM-02", title: "Unbleached Belgian Linen Weave", category: "materials", categoryLabel: "Materials", format: "portrait", formatLabel: "Portrait 1:2", medium: "Plain-weave raw flax bookcloth", stock: "380 gsm wet-spun flax on kozo backing", dimensions: "180 × 360 mm", edition: "Swatch Folio B · Sample 04", year: "2025", notes: "Vertical swatch card comparing warp tension and slub frequency between raw wet-spun Belgian flax and calendered bookbinding cloth under raking studio light.", src: "/images/blocks/mixed-gallery/belgian-linen-weave.webp", alt: "Tall vertical raw Belgian linen bookcloth specimen pinned with a brass tack onto a dark charcoal drafting board, showing woven grain and frayed selvedge", }, { id: "kettle-stitch-monograph", plate: "FM-03", title: "Exposed Kettle-Stitch Monograph", category: "editions", categoryLabel: "Editions", format: "square", formatLabel: "Square 1:1", medium: "Smyth-sewn open-spine dummy", stock: "1.8 mm millboard & 120 gsm cream laid", dimensions: "210 × 210 mm", edition: "Edition of 120 · Dummy #03", year: "2024", notes: "Square open-spine binding study joining six folded signatures of cream laid text paper with waxed ochre linen thread so spreads open completely flat.", src: "/images/blocks/mixed-gallery/kettle-stitch-monograph.webp", alt: "Overhead view of a square open-spine monograph with exposed folded paper signatures bound in waxed ochre kettle-stitch linen thread", }, { id: "forma-grotesk-specimen", plate: "FM-04", title: "Lead Type Specimen: Forma 48pt", category: "print", categoryLabel: "Print", format: "square", formatLabel: "Square 1:1", medium: "Letterpress relief broadside", stock: "Crane Lettra 300 gsm pearl cotton", dimensions: "240 × 240 mm", edition: "Edition of 60 · Proof #09", year: "2024", notes: "Deep-impression letterpress study struck from foundry metal forms and brass rules, measuring ink squeeze and counter-form balance on soft cotton rag.", src: "/images/blocks/mixed-gallery/forma-grotesk-specimen.webp", alt: "Square Swiss-grid letterpress specimen sheet featuring bold black geometric letterforms and red hairline baseline guides on pearl cotton paper", }, { id: "deckle-paper-tower", plate: "FM-05", title: "Blind-Embossed Paper Waterfall", category: "editions", categoryLabel: "Editions", format: "portrait", formatLabel: "Portrait 1:2", medium: "Six-grade archival rag & kozo set", stock: "90–350 gsm cotton, kozo, and hemp", dimensions: "190 × 380 mm", edition: "Archive Box II · Set 07", year: "2025", notes: "Stepped vertical cascade of six archival paper stocks, each struck with a concentric circular blind emboss to test fiber resilience and shadow relief.", src: "/images/blocks/mixed-gallery/deckle-paper-tower.webp", alt: "Tall vertical stepped stack of six archival paper sheets from warm ivory to deep slate, each embossed with concentric circular rings", }, { id: "celadon-iron-glaze-tiles", plate: "FM-06", title: "Reduction-Fired Celadon & Iron Tiles", category: "materials", categoryLabel: "Materials", format: "square", formatLabel: "Square 1:1", medium: "Cone 10 stoneware glaze matrix", stock: "Speckled buff clay & wood-ash glaze", dimensions: "220 × 220 mm", edition: "Kiln Log 18 · Tray 02", year: "2025", notes: "Nine-tile ceramic glaze test grid charting iron oxide concentration from translucent sea-green celadon through tenmoku rust to matte charred basalt.", src: "/images/blocks/mixed-gallery/celadon-iron-glaze-tiles.webp", alt: "Square 3-by-3 tray of beveled stoneware ceramic test tiles glazed in pale celadon, ochre ash, iron rust, slate blue, and charcoal", }, { id: "patinated-brass-foils", plate: "FM-07", title: "Patinated Brass & Copper Foils", category: "materials", categoryLabel: "Materials", format: "square", formatLabel: "Square 1:1", medium: "Hot-foil stamping shim archive", stock: "0.4 mm cartridge brass & verdigris copper", dimensions: "200 × 200 mm", edition: "Metal Archive · Plate 11", year: "2024", notes: "Metallurgical surface study comparing specular sheen and oxidation behavior across brushed brass, satin copper, oil-rubbed bronze, and turquoise verdigris.", src: "/images/blocks/mixed-gallery/patinated-brass-foils.webp", alt: "Four geometric metallic foil plates—brushed brass circle, satin copper square, ribbed bronze block, and oxidized verdigris semicircle—set on a dark tray", }, { id: "mineral-pigment-spectrum", plate: "FM-08", title: "Chromatic Mineral Pigment Spectrum", category: "print", categoryLabel: "Print", format: "wide", formatLabel: "Wide 2:1", medium: "Ten-band silkscreen ink drawdown", stock: "Somerset Satin 300 gsm & linseed varnish", dimensions: "480 × 240 mm", edition: "Edition of 50 · Pull #06", year: "2026", notes: "Panoramic knife-drawdown card mapping opacity, satin sheen, and undertone warmth across ten hand-mulled mineral pigments from raw ochre to lamp black.", src: "/images/blocks/mixed-gallery/mineral-pigment-spectrum.webp", alt: "Wide archival pigment drawdown sheet showing ten vertical silkscreen ink bands transitioning from bone white and ochre through terracotta, sage, indigo, and lamp black", },];
const CATEGORY_OPTIONS: ReadonlyArray<{ value: MixedGalleryCategory; label: string;}> = [ { value: "all", label: "All" }, { value: "print", label: "Print" }, { value: "materials", label: "Materials" }, { value: "editions", label: "Editions" },];
const TABLET = "@container mixed-gallery (max-width: 860px)";const COMPACT = "@container mixed-gallery (max-width: 560px)";
const styles = stylex.create({ root: { backgroundColor: semanticColors.bg, color: semanticColors.fg, containerName: "mixed-gallery", containerType: "inline-size", fontFamily: fonts.body, minHeight: "100%", paddingBlock: { default: spacing._12, [COMPACT]: spacing._8, }, paddingInline: { default: spacing._6, [COMPACT]: spacing._4, }, width: "100%", }, content: { maxWidth: "75rem", width: "100%", }, header: { textAlign: "center", }, headline: { marginBlock: 0, maxWidth: "24ch", textAlign: "center", textWrap: "balance", }, description: { maxWidth: "58ch", textWrap: "balance", }, filterBar: { maxWidth: "100%", overflowX: "auto", paddingBlock: spacing._0_5, }, gallerySection: { width: "100%", }, // Asymmetric mixed-aspect bento grid: 3 columns on desktop with wide 2x1 // panoramic heroes, tall 1x2 portrait sheets, and 1x1 square specimens. // Collapses to a balanced 2-column bento on tablet and 1 column on mobile. bentoGrid: { gridTemplateColumns: { default: "repeat(3, minmax(0, 1fr))", [TABLET]: "repeat(2, minmax(0, 1fr))", [COMPACT]: "minmax(0, 1fr)", }, width: "100%", }, // Balanced grid used when viewing a filtered subset so plates never leave // awkward orphan spans. filteredGridThree: { gridTemplateColumns: { default: "repeat(3, minmax(0, 1fr))", [TABLET]: "repeat(2, minmax(0, 1fr))", [COMPACT]: "minmax(0, 1fr)", }, width: "100%", }, filteredGridTwo: { gridTemplateColumns: { default: "repeat(2, minmax(0, 1fr))", [COMPACT]: "minmax(0, 1fr)", }, width: "100%", }, tileButton: { "--tile-img-scale": { default: "1", ":hover": "1.035", ":focus-visible": "1.035", }, "--tile-cue-opacity": { default: "0.78", ":hover": "1", ":focus-visible": "1", }, appearance: "none", backgroundColor: semanticColors.bgMuted, borderColor: { default: semanticColors.border, ":hover": semanticColors.borderEmphasized, ":focus-visible": semanticColors.accentBorder, }, borderRadius: semanticRadii.panelLg, borderStyle: "solid", borderWidth: "1px", boxShadow: { default: semanticShadows.xs, ":hover": semanticShadows.md, }, color: "#faf8f5", cursor: "pointer", display: "block", fontFamily: "inherit", minHeight: 0, minWidth: 0, outlineColor: { default: null, ":focus-visible": semanticColors.accentFocusRing, }, outlineOffset: { default: null, ":focus-visible": "2px", }, outlineStyle: { default: "none", ":focus-visible": "solid", }, outlineWidth: { default: 0, ":focus-visible": "2px", }, overflow: "hidden", paddingBlock: 0, paddingInline: 0, position: "relative", textAlign: "left", transform: { default: "translateY(0px)", ":hover": "translateY(-2px)", }, transitionDuration: durations.moderate, transitionProperty: "border-color, box-shadow, transform", transitionTimingFunction: "cubic-bezier(0.2, 0, 0, 1)", width: "100%", }, tileWide: { aspectRatio: { default: "2 / 1", [TABLET]: "16 / 9", [COMPACT]: "3 / 2", }, gridColumnEnd: { default: "span 2", [COMPACT]: "auto", }, }, tilePortrait: { aspectRatio: { default: "auto", [TABLET]: "1 / 1", [COMPACT]: "4 / 5", }, gridRowEnd: { default: "span 2", [TABLET]: "auto", }, height: { default: "100%", [TABLET]: "auto", }, }, tileSquare: { aspectRatio: { default: "1 / 1", [COMPACT]: "4 / 3", }, }, tileFiltered: { aspectRatio: "4 / 3", }, tileImage: { bottom: 0, display: "block", height: "100%", left: 0, objectFit: "cover", position: "absolute", right: 0, top: 0, transform: "scale(var(--tile-img-scale, 1))", transitionDuration: durations.slow, transitionProperty: "transform", transitionTimingFunction: "cubic-bezier(0.2, 0, 0, 1)", width: "100%", }, tileTopBar: { left: spacing._3_5, pointerEvents: "none", position: "absolute", right: spacing._3_5, top: spacing._3_5, zIndex: 1, }, platePill: { backdropFilter: "blur(8px)", backgroundColor: "rgba(18, 17, 16, 0.68)", borderColor: "rgba(255, 255, 255, 0.16)", borderRadius: semanticRadii.indicatorSm, borderStyle: "solid", borderWidth: "1px", color: "#faf8f5", paddingBlock: spacing._0_5, paddingInline: spacing._1_5, }, inspectCue: { backdropFilter: "blur(8px)", backgroundColor: "rgba(18, 17, 16, 0.56)", borderColor: "rgba(255, 255, 255, 0.16)", borderStyle: "solid", borderWidth: "1px", color: "#faf8f5", height: "1.75rem", opacity: "var(--tile-cue-opacity, 0.78)", transitionDuration: durations.moderate, transitionProperty: "opacity", width: "1.75rem", }, tileOverlay: { backgroundImage: "linear-gradient(to top, rgba(16, 15, 14, 0.84) 0%, rgba(16, 15, 14, 0.44) 55%, rgba(16, 15, 14, 0) 100%)", bottom: 0, left: 0, paddingBottom: spacing._3_5, paddingInline: spacing._4, paddingTop: spacing._10, pointerEvents: "none", position: "absolute", right: 0, zIndex: 1, }, tileTitle: { color: "#faf8f5", }, tileMedium: { color: "rgba(250, 248, 245, 0.8)", }, tileFormat: { color: "rgba(250, 248, 245, 0.66)", flexShrink: 0, }, // Lightbox dialog styles dialogContent: { borderColor: semanticColors.border, borderStyle: "solid", borderWidth: "1px", maxWidth: "min(56rem, calc(100vw - 2rem))", overflow: "hidden", width: "calc(100% - 2rem)", }, dialogHeader: { alignItems: "flex-start", display: "flex", gap: spacing._4, justifyContent: "space-between", paddingBlock: spacing._4, paddingInline: spacing._5, }, dialogCloseButton: { position: "static", right: "auto", top: "auto", }, dialogBody: { display: "flex", flexDirection: "column", gap: spacing._4, paddingBlock: 0, paddingInline: spacing._5, }, lightboxMat: { backgroundColor: semanticColors.bgMuted, borderColor: semanticColors.borderSubtle, borderRadius: semanticRadii.panel, borderStyle: "solid", borderWidth: "1px", height: "min(52dvh, 26rem)", overflow: "hidden", paddingBlock: spacing._4, paddingInline: spacing._4, width: "100%", }, lightboxImage: { borderRadius: semanticRadii.control, boxShadow: semanticShadows.md, display: "block", maxHeight: "100%", maxWidth: "100%", objectFit: "contain", }, lightboxMetaGrid: { gridTemplateColumns: { default: "minmax(0, 1.35fr) minmax(0, 1fr)", "@media (max-width: 680px)": "minmax(0, 1fr)", }, paddingBottom: spacing._4, }, lightboxNotes: { lineHeight: lineHeights.md, marginBlock: 0, }, specList: { marginBlock: 0, }, specValue: { marginInlineStart: 0, }, dialogFooter: { alignItems: "center", display: "flex", flexWrap: "wrap", gap: spacing._3, justifyContent: "space-between", paddingBlock: spacing._3_5, paddingInline: spacing._5, }, kbdHints: { display: { default: "inline-flex", "@media (max-width: 640px)": "none", }, }, counterText: { minWidth: "4.5rem", },});
export interface MixedGalleryProps extends StyleOverrideProps { /** Optional eyebrow pill displayed above the display heading. */ eyebrow?: string; /** Primary display heading for the archive gallery. */ title?: string; /** Supporting curatorial introduction below the heading. */ description?: string; /** Initial active category filter. */ defaultCategory?: MixedGalleryCategory; /** Custom gallery plates; defaults to the Studio Forma Material & Print Archive. */ items?: ReadonlyArray<MixedGalleryItem>; /** Called when a gallery plate is opened in the lightbox. */ onSelectItem?: (item: MixedGalleryItem) => void;}
/** * MixedGallery — asymmetric mixed-aspect bento gallery pairing panoramic wide * plates, tall vertical portrait specimens, and square studies with a segmented * category filter and a keyboard-navigable lightbox dialog. */export function MixedGallery({ eyebrow = "Studio Forma · Material & Print Archive", title = "Tactile studies in pigment, weave, and press", description = "Eight archival specimen plates pairing risograph overprints, raw linen weaves, reduction-fired glazes, and hand-sewn paper dummies across mixed aspect ratios.", defaultCategory = "all", items = DEFAULT_GALLERY_ITEMS, onSelectItem, palette, style,}: MixedGalleryProps) { const [category, setCategory] = useState<MixedGalleryCategory>(defaultCategory); const [activeId, setActiveId] = useState<string | null>(null);
const filteredItems = useMemo( () => category === "all" ? items : items.filter((item) => item.category === category), [category, items], );
const activeIndex = useMemo( () => activeId === null ? -1 : filteredItems.findIndex((item) => item.id === activeId), [activeId, filteredItems], );
const activeItem = activeIndex >= 0 ? filteredItems[activeIndex] : null;
const countsByCategory = useMemo(() => { const counts: Record<MixedGalleryCategory, number> = { all: items.length, print: 0, materials: 0, editions: 0, }; for (const item of items) { counts[item.category] += 1; } return counts; }, [items]);
const handleOpenItem = useCallback( (item: MixedGalleryItem) => { setActiveId(item.id); onSelectItem?.(item); }, [onSelectItem], );
const handleStep = useCallback( (delta: -1 | 1) => { if (filteredItems.length <= 1 || activeIndex < 0) return; const nextIndex = (activeIndex + delta + filteredItems.length) % filteredItems.length; const nextItem = filteredItems[nextIndex]; if (nextItem) { setActiveId(nextItem.id); onSelectItem?.(nextItem); } }, [activeIndex, filteredItems, onSelectItem], );
const handleCategoryChange = useCallback((nextValue: string) => { if ( nextValue === "all" || nextValue === "print" || nextValue === "materials" || nextValue === "editions" ) { setCategory(nextValue); setActiveId(null); } }, []);
useEffect(() => { if (!activeItem) return; const handleKeyDown = (event: KeyboardEvent) => { if (event.metaKey || event.ctrlKey || event.altKey) return; if (event.key === "ArrowLeft") { event.preventDefault(); handleStep(-1); } else if (event.key === "ArrowRight") { event.preventDefault(); handleStep(1); } }; window.addEventListener("keydown", handleKeyDown); return () => window.removeEventListener("keydown", handleKeyDown); }, [activeItem, handleStep]);
const isBentoLayout = category === "all"; const gridStyle = isBentoLayout ? styles.bentoGrid : filteredItems.length === 2 ? styles.filteredGridTwo : styles.filteredGridThree;
return ( <VStack align="center" gap="0" palette={palette} style={[styles.root, style]}> <VStack render={<main />} gap="8" style={styles.content}> <VStack render={<header />} align="center" gap="5" style={styles.header}> <VStack align="center" gap="3"> {eyebrow ? ( <Badge variant="subtle" size="md"> {eyebrow} </Badge> ) : null} <Heading render={<h1 />} size="5xl" style={styles.headline}> {title} </Heading> <Text variant="muted" size="md" align="center" style={styles.description} > {description} </Text> </VStack>
<Center style={styles.filterBar}> <SegmentGroup.Root size="sm" value={category} onValueChange={handleCategoryChange} aria-label="Filter archive plates by discipline" > {CATEGORY_OPTIONS.map((option) => ( <SegmentGroup.Item key={option.value} value={option.value}> <span>{option.label}</span> <Text render={<span />} variant="mono" size="xs" tone="subtle" tabular="true" > {countsByCategory[option.value]} </Text> </SegmentGroup.Item> ))} </SegmentGroup.Root> </Center> </VStack>
<Section.Root aria-label="Studio Forma mixed-aspect specimen gallery" style={styles.gallerySection} > <Section.Body> <Grid gap="4" style={gridStyle}> {filteredItems.map((item) => { const formatStyle = !isBentoLayout ? styles.tileFiltered : item.format === "wide" ? styles.tileWide : item.format === "portrait" ? styles.tilePortrait : styles.tileSquare;
return ( <button key={item.id} type="button" onClick={() => handleOpenItem(item)} aria-label={`Inspect ${item.plate}: ${item.title} (${item.medium})`} {...stylex.props(styles.tileButton, formatStyle)} > <img src={item.src} alt={item.alt} loading="lazy" {...stylex.props(styles.tileImage)} />
<HStack render={<span />} gap="0" justify="between" style={styles.tileTopBar} > <Text render={<span />} variant="mono" size="2xs" tabular="true" style={styles.platePill} > {item.plate} </Text> <Circle render={<span aria-hidden="true" />} size="sm" style={styles.inspectCue} > <Icon size="xs" viewBox="0 0 20 20" fill="none" stroke="currentColor" strokeWidth="1.75" strokeLinecap="round" strokeLinejoin="round" > <path d="M12.5 3.5h4v4" /> <path d="M7.5 16.5h-4v-4" /> <path d="M16.5 3.5 11.5 8.5" /> <path d="M3.5 16.5 8.5 11.5" /> </Icon> </Circle> </HStack>
<VStack render={<span />} gap="0.5" style={styles.tileOverlay} > <Text render={<span />} variant="label" size="sm" truncate="true" style={styles.tileTitle} > {item.title} </Text> <HStack render={<span />} align="baseline" gap="2" justify="between" > <Text render={<span />} size="xs" truncate="true" style={styles.tileMedium} > {item.medium} </Text> <Text render={<span />} variant="mono" size="2xs" tabular="true" style={styles.tileFormat} > {item.formatLabel} </Text> </HStack> </VStack> </button> ); })} </Grid> </Section.Body> </Section.Root> </VStack>
<Dialog.Root open={activeItem !== null} onOpenChange={(nextOpen) => { if (!nextOpen) setActiveId(null); }} size="xl" placement="center" > <Dialog.Backdrop /> <Dialog.Content style={styles.dialogContent}> {activeItem ? ( <> <Dialog.Header style={styles.dialogHeader}> <VStack gap="1.5"> <HStack wrap="wrap" gap="1.5"> <Badge variant="subtle" size="sm"> {activeItem.plate} </Badge> <Badge variant="outline" size="sm"> {activeItem.categoryLabel} </Badge> <Badge variant="surface" size="sm"> {activeItem.formatLabel} </Badge> </HStack> <Dialog.Title>{activeItem.title}</Dialog.Title> </VStack>
<Dialog.Close render={ <IconButton variant="ghost" size="sm" aria-label="Close lightbox" /> } style={styles.dialogCloseButton} > <Icon size="sm" viewBox="0 0 20 20" fill="none" stroke="currentColor" strokeWidth="1.75" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" > <path d="M5 5l10 10" /> <path d="M15 5 5 15" /> </Icon> </Dialog.Close> </Dialog.Header>
<Dialog.Body style={styles.dialogBody}> <Center style={styles.lightboxMat}> <img src={activeItem.src} alt={activeItem.alt} {...stylex.props(styles.lightboxImage)} /> </Center>
<Grid gap="4" style={styles.lightboxMetaGrid}> <VStack gap="1.5"> <Text variant="label" size="sm"> {activeItem.medium} </Text> <Dialog.Description style={styles.lightboxNotes}> {activeItem.notes} </Dialog.Description> </VStack>
<Grid render={<dl />} columns="1" gap="2" style={styles.specList} > <HStack align="baseline" gap="3" justify="between"> <Text render={<dt />} variant="subtle" size="xs"> Stock </Text> <Text render={<dd />} variant="mono" size="xs" align="end" tabular="true" style={styles.specValue} > {activeItem.stock} </Text> </HStack> <HStack align="baseline" gap="3" justify="between"> <Text render={<dt />} variant="subtle" size="xs"> Dimensions </Text> <Text render={<dd />} variant="mono" size="xs" align="end" tabular="true" style={styles.specValue} > {activeItem.dimensions} </Text> </HStack> <HStack align="baseline" gap="3" justify="between"> <Text render={<dt />} variant="subtle" size="xs"> Edition </Text> <Text render={<dd />} variant="mono" size="xs" align="end" tabular="true" style={styles.specValue} > {activeItem.edition} </Text> </HStack> <HStack align="baseline" gap="3" justify="between"> <Text render={<dt />} variant="subtle" size="xs"> Year </Text> <Text render={<dd />} variant="mono" size="xs" align="end" tabular="true" style={styles.specValue} > {activeItem.year} </Text> </HStack> </Grid> </Grid> </Dialog.Body>
<Separator decorative />
<Dialog.Footer style={styles.dialogFooter}> <HStack gap="1.5" style={styles.kbdHints}> <Kbd size="sm">←</Kbd> <Kbd size="sm">→</Kbd> <Text render={<span />} variant="subtle" size="xs"> Navigate plates </Text> </HStack>
<HStack gap="2"> <Button variant="surface" size="sm" disabled={filteredItems.length <= 1} onClick={() => handleStep(-1)} > <Icon size="sm" viewBox="0 0 20 20" fill="none" stroke="currentColor" strokeWidth="1.75" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" > <path d="M12.5 5 7.5 10l5 5" /> </Icon> Previous </Button>
<Text render={<span aria-live="polite" />} variant="mono" size="xs" tone="muted" align="center" tabular="true" style={styles.counterText} > {String(activeIndex + 1).padStart(2, "0")} /{" "} {String(filteredItems.length).padStart(2, "0")} </Text>
<Button variant="surface" size="sm" disabled={filteredItems.length <= 1} onClick={() => handleStep(1)} > Next <Icon size="sm" viewBox="0 0 20 20" fill="none" stroke="currentColor" strokeWidth="1.75" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" > <path d="M7.5 5l5 5-5 5" /> </Icon> </Button> </HStack> </Dialog.Footer> </> ) : null} </Dialog.Content> </Dialog.Root> </VStack> );}
Inspired by the Mixed Gallery template from Astryx (MIT License · Copyright (c) 2026 Meta Platforms, Inc.).