shadcn.io is not affiliated with official shadcn/ui
Photo Essay Gallery Blog Block for React
A photo-essay contact sheet: one wide and three narrow framed plates, each a figure with a numbered caption that is its one link, and a colophon cell; no lightbox.
Installation
Overview
A photo-essay sheet for React with Base UI, written for Platecraft, a photography journal. A centred header names the essay, and under it four plates sit on a contact sheet: one wide plate across two columns and three narrow ones, plus a colophon cell with the photographer's note and a link to the essay. Each plate is a figure framed with overshooting hairlines and plus marks on its corners, carries its number in the corner and a caption such as "Plate 02. Glass at dusk" with the camera's note under it; the caption is the plate's one link, and the whole plate is its target. The plates are drawn in your theme's tokens, never photographs: a grid in perspective, contour lines, a halftone ramp and truchet tiles. Three columns on a desktop, two on a tablet, one on a phone. There is no lightbox; the link goes to the essay. It's built from Guides, with CSS for the entrance and the hover. For photography journals, portfolio essays and any post that leads with a few strong pictures.
FAQ
How do I add my own plates?
Edit DRAFTS at the top of the file: each plate has a number, a title, an exposure line and a kind. One plate has wide: true and runs two columns; one has tall: true and stretches to the wide plate's height on a desktop. The sheet is laid out for one wide and three narrow plates; a different mix needs its grid spans changed.
How do I use real photographs?
Put an img with size-full object-cover in place of the pattern inside each plate's frame (the PlateArt call) and keep its alt text; the frame, the corner marks, the number and the caption stay as they are. The patterns are aria-hidden artwork, so the caption is what names the plate for assistive technology; with photographs, describe each one in its alt.
What does a plate link to, and where is the lightbox?
The caption's link covers the whole figure, so a click anywhere on the plate opens the essay or the plate's own page, and the keyboard focus ring is drawn around the figure. There is no lightbox in this block; the gallery category has blocks that open pictures in one.
How are the plate patterns built?
Each is SVG path data computed at module scope: perspective lines running to one vanishing point, contour rings around a summit, dots that swell from the start of the plate to the end, and forty-pixel tiles each turned by a fixed rule. Two weights, light at 20% and strong at 60% of the foreground colour, and every stroke stays a hairline at any plate size.
Related
- Pro
Masonry Wall Blog
Card gridsEight posts in staggered CSS columns, each cell leading with a drawn pattern cover in a poster, square or wide shape; six show on a phone behind a More posts button.
- Pro
Cards Grid Blog
Card gridsThe six latest posts of an engineering blog as cards on shared hairlines: drawn greyscale covers, a category, the title as the card's one link, a one-line dek and a byline with the date and reading time.
- Pro
Player Frame Video Blog
Audio, video, photosFour video lessons as cells: each cover is a drawn player frame with a poster pattern, a play mark and a scrub bar with a tick for every chapter, a duration badge, the title and the date.
- Pro
Lightbox Gallery
Stage and thumbnailsNine pictures of a photography studio's year on shared hairlines, a featured frame and a caption under each, where every frame opens one viewer dialog with the whole picture, its credit, Previous and Next, a counter, arrow keys and a swipe.
- Pro
Large Preview Blog
Featured storyOne long read at poster size: a wide drawn cover in a frame and a raised panel with the title, the dek and a byline whose author link opens a hover card.
- Pro
Rectangular Cards Blog
Card gridsFour horizontal post cards in rows from rail to rail, the drawn cover at one end and the text at the other, mirroring row by row, each row numbered.