Default: 5 columns per row (at lg breakpoint). The columnsPerRow prop controls which preset is used. Breakpoints follow Tailwind's standard: base → sm (640px) → md (768px) → lg (1024px) → xl (1280px) → 2xl (1536px).
The actual grid is applied in the render at line 315 in ImageGalleryGrid.tsx:
rangeStart/rangeEnd: Display range (e.g., "1-45 of 230")
Navigation State Machine:
typescript
type NavigationStatus = 'idle' | 'navigating'
// Tracks direction ('prev'|'next'), target page, and timestamp
// Prevents double-clicking during navigation
// Auto-clears after 5s safety timeout or when new images arrive
Backfill Skeletons: When user scrolls and requests more items, backfill skeletons appear at the bottom while loading. They're cleared as soon as new images arrive.
7. Key Props Controlling Layout
Prop
Purpose
Default
columnsPerRow
Which GRID_COLUMN_CLASSES preset to use (3-7)
5
itemsPerPage
Override items per page (auto-selects MOBILE/DESKTOP if not provided)
Auto
reducedSpacing
Reduce gap-4 to gap-2 and padding
false
whiteText
Dark mode styling
false
projectAspectRatio
Aspect ratio for all items (from project)
"16:9"
isMobile
(internal) Mobile detection
Auto-detected
gridColumnClasses
(internal) Computed Tailwind classes
From columnsPerRow
8. Image Display Flow
code
Raw Images (props)
↓
Filter by media type, search, shot, star status, tool type
↓ (filteredImages)
Slice by itemsPerPage and current page
↓ (paginatedImages)
ProgressiveLoadingManager batches by priority & visibility
↓
ImageGalleryItem renders with:
- Aspect ratio padding container
- Lazy-loaded thumbnail
- Video scrubber (if video & not videosAsThumbnails)
- Overlays with controls
↓
Lightbox viewer (separate modal outside grid)
Key Takeaways
Layout is responsive via Tailwind Grid with 5 preset column configurations
Pagination is flexible: supports both client-side (local slicing) and server-side (parent-controlled) modes
Aspect ratio is project-wide, not per-image, and maintained via padding-bottom trick