responsive image grid with lazy loading and hover zoom.

Live preview

Install

From your site folder, run:

jprot add PhotoGallery

That downloads the self-contained component into theme/components/PhotoGallery.js,

where it is picked up automatically — the same way as any built-in component.

To remove it later, just delete that file.

Use it as a homepage section

Add an entry to the sections: list in jprot.config.js:

sections: [
  { component: 'PhotoGallery', title: 'PhotoGallery' },
]

Use it inside a page

On its own line in any Markdown file, passing the props:

:::PhotoGallery images='["https://picsum.photos/seed/g1/600/450","https://picsum.photos/seed/g2/600/450","https://picsum.photos/seed/g3/600/450"]'

Props

PropTypeNote
imagesarraylist of image URLs
altstringbase alt text

↩ Back to all elements