Skip to content

Media grid

Pro

Square photo tiles, a sideways row on compact windows and a grid from medium up; a press on a tile reports it (`onAction`), for the app to open the viewer. Not an M3 component (@windmorph/react-pro).

import { MediaGrid } from '@windmorph/react-pro';

Part of Windmorph Pro, paid components on the free core, not on sale yet. See the Pro guide for what it includes and to register interest.

Playground

Code

import { photos } from './photos';import { MediaGrid } from '@windmorph/react-pro'; <MediaGrid  max={6}  items={photos}  onAction={(index) => console.log('Open photo', index)}  aria-label="Photos"/>

Examples

A profile’s photos with the viewer

Every photo, in four columns

Photos stored at several widths

A photo that can’t be loaded