Galleria slideshow site using React 19, TypeScript, Vite & CSS Modules

Solution retrospective
I'm most proud of the CSS column-count masonry grid — achieving a 4-column Pinterest-style layout with zero JavaScript and no external library felt elegant. The responsive breakpoints (1-col / 2-col / 3-col / 4-col) all work purely through a single CSS property change at each breakpoint.
Next time I'd add smooth slide-transition animations between gallery items and a keyboard-only navigation mode for better accessibility when browsing the slideshow.
What challenges did you encounter, and how did you overcome them?Two main challenges:
-
Asset paths with React Router —
data.jsonuses./assets/...paths that resolve relative to the URL path, not the domain root. At/gallery/0the browser requested/gallery/assets/...causing 404s. I fixed this with a path normalizer inpaintings.tsthat strips the leading./. -
Pixel-perfect detail layout — the Figma spec called for an image overlapping the info panel. I achieved this using a two-column CSS Grid (
848px 1fr) withposition: relativeon the left column and absolutely-positioned children, which matched the design exactly without anymargin-tophacks.
I'd welcome feedback on:
- Accessibility of the lightbox modal — I used
role="dialog"witharia-modal="true"and trap focus on open. Is there anything missing for full WCAG 2.1 AA compliance? - Progress bar semantics — I used
role="progressbar"witharia-valuenow,aria-valuemin, andaria-valuemax. Any improvements for screen reader announcements as the slide changes? - CSS column-count vs CSS Grid masonry — The spec uses
column-countbut the newergrid-template-rows: masonryis coming to CSS. Wascolumn-countthe right call for today's browser support?
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Gustavo Sanchez’s solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord