0.3.0 • Published 7 years ago

react-amazon-gallery v0.3.0

Weekly downloads
10
License
MIT
Repository
github
Last release
7 years ago

React Amazon Gallery

Inspired by Amazon's clean display for products.

PeerDependencies Dependencies DevDependencies

Github Page

Sample Screencap

Image of Gallery

Current Capabilities

  1. One Dimensional Gallery View
  • Renders a one dimensional array of image src strings.
  1. Two Dimensional Gallery View
  • Allows for clean browsing experience of product variations and similar perspective combinations which would look terrible in a grid.

Prerequisites

You should be using NodeJS and ReactJS

Installation

React Amazon Gallery is available as an npm package.

npm install react-amazon-gallery [-S]

or

yarn add react-amazon-gallery

Usage

Using React Amazon Gallery is very straightforward. Once it is included in your project, you can use the components this way:

import React from 'react';
import Gallery from 'react-amazon-gallery';

let images = [
  './images/image_1.jpg',
  './images/image_2.jpg',
  './images/image_3.jpg',
  './images/image_4.jpg',
  ...
]

const MyAwesomeReactComponent = () => (
  <Gallery images={images} />
);

export default MyAwesomeReactComponent;

Customization

KeyRequiredTypeDescription
imagesArrayA 1D or a 2D Array of images. (2D) Images in Zero Index will be the secondary thumbnails
heightInteger/StringThis will set the total height of the chart.
widthInteger/StringThis will set override the width of the chart.
mainobjectThis is the config object for the main thumbnails
-orientationEnum'vertical' or 'horizontal' will change the flow of image thumbnails
-overlayBooleanIf set, the image thumbnails will not be given gutter padding
-posYEnum'top' or 'bot' will shift where the thumbnails are positioned
-posXEnum'left' or 'right' will shift where the thumbnails are positioned
-spacingIntegerDistance between image thumbnails
-sizeIntegerSets the size of the thumbnails
-hlColorStringAccepts CSS colors (Hex/Names)
-hlSizeIntegerSets the size of the thumbnail's highlight glow effect
styleObjectStyle that is passed to SVG.
wrapStyleObjectStyle for wrapper div (div).

Contribute

This project is open source of course!. I'd greatly appreciate any contribution you make. :)

To get started developing simply run

npm start

And open your browser to http://localhost:8000/

I like to develop my components in a demo app that doubles as the Github Page.

Building

This project uses Webpack to develop and bundle the demo page, the config can be found in the config folder.

To transpile the source simply run

npm run babel

To build a new Demo app, run

npm run deploy:prod

License

This project is licensed under the terms of the MIT license

0.3.0

7 years ago

0.2.8

8 years ago

0.2.7

8 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.13

8 years ago

0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago