Edition Inspector
Matted edition cards for a print room; opening one drops into a viewer that keeps the whole sheet and its detail crops in one place. Pill controls swap what the large frame shows, the full sheet or one of several detail-crop views, while a side column holds the print's process notes, sheet size, and edition information.
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/edition-inspector.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/gallery/gallery18.tsx instead.
Usage
The file also exports gallery18Demo, 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 { Gallery18, gallery18Demo } from "@/components/blocks/gallery/gallery18"; export default function Page() { return <Gallery18 {...gallery18Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow | string | "Print Room" | Small label above the heading; omitted entirely when unset. |
| heading | string | "Editions" | Section heading. |
| description | string | "Open a sheet to inspect its detail crops alongside the full print." | Supporting copy under the heading; omitted entirely when unset. |
| editions | Edition[] | none | The matted edition cards; each has its own sheet image, detail-crop views, and print/edition details. |
| className | string | undefined | Extra classes for the outer section element. |
Types
interface DetailView { label: string; image?: { src: string; alt: string }; } interface Edition { title: string; year: string; sheetImage?: { src: string; alt: string }; detailViews: DetailView[]; processNotes: string; sheetSize: string; editionInfo: string; }
Behavior notes
- Real client-side state: `selectedView` (number, -1 means the full sheet, otherwise an index into that edition's `detailViews`) drives which image the large frame shows; the pill row is a genuine toggle group, not decorative tabs, each pill setting `selectedView` and reflecting the current selection via `aria-pressed`.
- Opening a different edition resets `selectedView` back to -1 inside the same click handler that sets `openIndex` (not in a useEffect), so a viewer always opens on the full sheet rather than carrying over the previous edition's selected crop.
- Escape closes the viewer via a keydown listener registered in useEffect only while it's open, removed on close.
- The side column (process notes, sheet size, edition info) is static per edition, read directly from props, it doesn't change when a detail-view pill is selected, only the large frame does.
- The dark scrim (bg-black/90) and white pill/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 gallery18.demo.tsx file per this repo's client/demo-file-split rule, not in gallery18.tsx itself.
More Gallery Blocks
View all →Plan Chest Sheet Stack
Ruled plan-chest drawer index that opens into a real stack viewer with a lift-and-rotate top sheet.
Wall Scale Viewer
Print grid with a wall-mockup viewer that scales the piece as you switch between size options.
Archive Record Cards
Text-first archive index that opens into a real 3D flip card of front image and back registrar notes.
Loupe Surface Studies
Square material/texture studies that open into a viewer with a real draggable magnifying loupe.
Paired Hang Compare
Two-to-a-bay staggered hang whose viewer can split into two real panes to compare a second work.
Dark Room Fade Viewer
Inverted low-light hang that opens into a chromeless viewer, the work fading up like a dimmer lamp.