Dark Room Fade Viewer
An inverted, low-light room where staggered frames hang on a dark panel. Opening one drops into a viewer with no chrome at all: the work fades up from black like a lamp on a dimmer, the caption fades in a beat after, and a small dot-rail at the bottom lets you jump straight to any frame in the hang.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, media-slot dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/dark-room-fade-viewer.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/gallery/gallery6.tsx instead.
Usage
The file also exports gallery6Demo, 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 { Gallery6, gallery6Demo } from "@/components/blocks/gallery/gallery6"; export default function Page() { return <Gallery6 {...gallery6Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Dark Room" | Section heading above the hang. |
| description | string | "A low-light hang. Open a frame and it comes up slowly, like a lamp on a dimmer." | Short supporting copy under the heading. |
| frames | HungFrame[] | none | The frames on the wall, rendered in the order passed in. |
| className | string | none | Extra classes for the outer section element. |
Types
type HungFrame = { title: string; image: { src: string; alt: string }; };
Behavior notes
- The dark panel and viewer use only semantic tokens (bg-foreground / text-background), inverted for the low-light effect, they are not literal color classes and still adapt with the site's own light/dark theme.
- The fade-up is a real CSS opacity transition, not a static image: the image and its caption are remounted (via a React key tied to the active index) on every open or index change, replaying a fade-in animation, with the caption's transition delayed slightly behind the image so it reads as a beat later, exactly like a dimmer settling.
- The dot rail is real client state, useState holds the active index, and clicking a dot jumps straight to that frame and replays the fade; Escape and the arrow keys also work.
- The close button is the only chrome shown, kept deliberately subtle (low-opacity icon, no background box) to keep the "no chrome" feel of the brief while still being operable.
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.
Counter Scrolling Image Bands
Two full-bleed image tracks scrolling in opposite directions, opening a framed lightbox on click.