Skip to content

Media upload grid

Pro

The photos someone is adding: upload progress and errors, remove and retry, drag to reorder (mouse, touch or keyboard), an add tile and file drop. Not an M3 component (@windmorph/react-pro).

import { MediaUploadGrid } 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

Uploading, 40%
Couldn't upload. Connection lost
Add photos

Code

import { MediaUploadGrid } from '@windmorph/react-pro'; <MediaUploadGrid  maxItems={6}  aria-label="Photos in your post"  items={[    { key: 'hills', previewUrl: '/photos/hills.jpg', alt: 'Hills under a blue sky', status: 'done' },    { key: 'rocks', previewUrl: '/photos/rocks.jpg', alt: 'Red rocks at dawn', status: 'uploading', progress: 0.4 },  ]}  onFileAccept={(files) => console.log(files)}/>

Examples

A post composer: progress, retry, reorder, a menu and one note for refused files

One scrolling row

Disabled while the post is sent