Archive Record Cards
A text-first archive index of reference number, thumbnail, title, and year. Opening an entry reveals a record card with two real sides: the work on the front, and the registrar's acquisition, condition, and storage notes on the back, flipped with an actual rotateY transform rather than a fake cross-fade.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, media-slot, avatar, avatar-initials dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/archive-record-cards.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/gallery/gallery3.tsx instead.
Usage
The file also exports gallery3Demo, 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 { Gallery3, gallery3Demo } from "@/components/blocks/gallery/gallery3"; export default function Page() { return <Gallery3 {...gallery3Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Archive Index" | Section heading above the index. |
| description | string | "Works held in the permanent collection, indexed by reference number." | Short supporting copy under the heading. |
| records | ArchiveRecord[] | none | The archive entries, rendered as index rows in the order passed in. |
| className | string | none | Extra classes for the outer section element. |
Types
type ArchiveRecord = { refNumber: string; title: string; year: string; image: { src: string; alt: string }; acquisition: string; condition: string; storage: string; catalogedBy: string; };
Behavior notes
- The card flip is real client state (useState boolean) driving an actual `[transform:rotateY(180deg)]` on a `[transform-style:preserve-3d]` wrapper, with both faces set to `[backface-visibility:hidden]` so only one side is ever visible at a time, not a fake opacity cross-fade.
- Prev/next navigation between records is real state, wired to on-screen buttons and the Escape/ArrowLeft/ArrowRight keys; changing records always resets the flip back to the front face.
- The registrar's initials avatar is generated from `catalogedBy` at render time via a small pure helper, not a real uploaded photo.
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.
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.
Counter Scrolling Image Bands
Two full-bleed image tracks scrolling in opposite directions, opening a framed lightbox on click.