
Book Flip
WebGL
Transform image browsing into an endless spatial grid for portfolios, campaigns, and visual archives that need more depth than a flat gallery.
Infinite Grid Gallery turns a flat collection of visuals into a field you can move through. The gallery stops feeling like a page section and starts feeling like space.
Use Infinite Grid Gallery when a portfolio, campaign archive, or image-led product story needs more presence than a normal grid. It works best when the visitor is supposed to browse by movement, not compare every item in one glance. The page job is exploration: images should keep arriving without making the user feel trapped in a canvas.
The production risk is orientation. Infinite galleries can become impressive and useless very quickly if the user loses their position or cannot reach a real item. Here the tiles are ordinary DOM images with captions, and clicking one opens a full-screen viewer with previous and next buttons, arrow-key and Escape support, and a thumbnail strip. The tiles themselves are not keyboard focusable, and they open the viewer rather than linking anywhere.
import InfiniteGridGallery from "@/components/effects/infinite-grid-gallery"; const page = () => { return ( <> <InfiniteGridGallery /> </> );}; export default page;A creative studio can use Infinite Grid Gallery on a selected-work page where the goal is not fast comparison, but atmosphere and curiosity. The visitor drags through a field of project stills, clicks one to open it full screen, and steps through the rest with the arrows or thumbnails. Links to case studies need to be added around it. The outcome is exploration: the work feels abundant without dumping every thumbnail into a static wall.
Not for ecommerce catalogues, pricing pages, comparison grids, documentation, or routes where users need fast scanning.
Not for image sets where every item must be visible at once before the visitor can make a decision.
Tiles are plain DOM images moved with transforms, and the grid is repeated so it can wrap endlessly. Every tile image loads eagerly so tiles never wrap in blank, so compress your images. The animation loop already pauses when the gallery is offscreen or the tab is hidden, and listeners are removed on unmount.
Each tile image uses its caption as alt text, but the tiles are not focusable and are not links, so keyboard users can only use the viewer once it is open. The gallery cancels mouse-wheel events on the whole window to pan the grid, so it suits a full-screen page rather than a section inside a scrolling page. On tablets and phones it switches to a 3- or 2-column grid with touch dragging. With reduced motion, panning snaps without easing or coasting, and the viewer opens, closes, and changes images instantly.
| Prop | Type | Default | Description |
|---|---|---|---|
columns | number | 4 | Desktop grid column count. |
gap | number | 44 | Spacing between grid images. |
speed | number | 1 | Grid movement speed. |
imageScale | number | 1 | Scale applied to gallery images. |
Use it when an image-led portfolio, campaign archive, or visual showcase needs spatial browsing instead of a standard grid.
It does not use WebGL, so there is no WebGL failure case: the tiles are ordinary HTML images. There is no separate fallback layout, though. If you need the images reachable by keyboard or in a simple list, add that yourself, because the tiles are not focusable.
The component builds a fixed grid (4 columns by default, 3 on tablets, 2 on phones), repeats it so it can wrap, and loads every tile image eagerly. The cost is driven by image file size and the number of tiles, so keep images compressed and the source list reasonable.
Clicking a tile (without dragging) opens a full-screen viewer with previous and next buttons, arrow-key and Escape support, and a thumbnail strip. Tiles do not link anywhere, so add case-study links around the gallery or in your own viewer content.
The component already scales down: at 768px and below it uses a 2-column grid, and up to 1025px a 3-column grid, panned by touch dragging. If a draggable field is still too much on phones, render a simple grid there instead.
Yes. A custom version should define image structure, tile treatment, drag and viewer behaviour, fallback layout, performance budget, source handoff, and implementation notes for the specific portfolio or launch context.
Need a custom effect? Tell us what to create.