Staaarter

Exhibition Wall Hang

Hangs works of different sizes along a single center line inside a matted wall panel, the way a real gallery wall mixes small and large pieces on one sightline. Each work carries its own label; clicking one opens a viewer that shows the piece in a white mount beside a museum wall label listing medium, dimensions, and year.

By Staaarter Team
Gallery
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its media-slot dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/exhibition-wall-hang.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/gallery/gallery13.tsx instead.

Usage

The file also exports gallery13Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Gallery13, gallery13Demo } from "@/components/blocks/gallery/gallery13";

export default function Page() {
  return <Gallery13 {...gallery13Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstring"On View"Small label above the heading; omitted entirely when unset.
headingstring"The East Wall"Section heading.
descriptionstring"Works of different scale, hung on one line."Supporting copy under the heading; omitted entirely when unset.
worksWallWork[]noneThe works hung on the wall, in display order; `size` controls each frame's height/width.
classNamestringundefinedExtra classes for the outer section element.

Types

type WallWorkSize = "sm" | "md" | "lg";

interface WallWork {
  title: string;
  medium: string;
  dimensions: string;
  year: string;
  size: WallWorkSize;
  image?: { src: string; alt: string };
}

Behavior notes

  • The wall panel centers every frame vertically with `items-center` against a shared horizontal guide line (a thin `bg-border` bar spanning the panel, purely decorative and `aria-hidden`), so frames of different `size` all hang on the same sightline exactly like a real salon wall, rather than each getting equal space in a grid cell.
  • Real client-side state: `openIndex` (number | null) opens the viewer for the clicked work.
  • The viewer supports ArrowLeft/ArrowRight and Escape via a keydown listener registered in useEffect only while a work is open, removed on close.
  • The wall-label side column is a real `<dl>` of medium/dimensions/year, not decorative text, matching how a museum actually labels a hung piece.
  • The dark scrim (bg-black/90), white mount border, and white/60-90 text chrome in the viewer are the deliberate dark-viewer-surface exception to the semantic-tokens rule used across this gallery category's other full-screen viewers.
  • "use client" component, so its demo props live in the sibling gallery13.demo.tsx file per this repo's client/demo-file-split rule, not in gallery13.tsx itself.