Blazing fast & beautiful galleries built for the web. try it out
Install with npm
npm i -S pro-gallery
or yarn
yarn add pro-gallery
import { ProGallery } from 'pro-gallery';
import 'pro-gallery/dist/statics/main.css';
<ProGallery
items={images}
styles={styleParams}
container={container}
/>
To see more options and a real usage example, use the playground code as reference
A list of objects each containing at least an id, dto, and metadata.
const items = [
{
itemId: 'sample-id',
mediaUrl: 'sample-url',
orderIndex: 0,
metaData: {
type: 'image',
height: 200,
width: 100,
name: 'sample-filename',
title: 'sample-title',
description: 'sample-description',
focalPoint: [0, 0],
link: {
url: 'http://example.com',
target: '_blank'
},
}
},
{...},
{...}
]
An object containing the width and height properties for the gallery
const container = {
width: 1000,
height: 500
}
A list of the styles and behaviour parameters for the gallery. To create you list of styles, use the playground and copy the generated code.
To run the environment locally:
- Clone the repo
cd <YOUR_CODE_DIRECTORY>
git clone [email protected]:wix-incubator/pro-gallery.git
- Install
lerna
npm i -g lerna
- Install Dependencies:
lerna run bootstrap --hoist
- Run the packages:
lerna run --parallel start
The playground will open in localhost:3000
, linked to a local instance of the gallery and layout.