npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-amazon-gallery

v0.3.0

Published

### Inspired by Amazon's clean display for products.

Downloads

11

Readme

React Amazon Gallery

Inspired by Amazon's clean display for products.

PeerDependencies Dependencies DevDependencies

Github Page

Sample Screencap

![Image of Gallery] (http://i.imgur.com/CHVrtc3.jpg)

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

Key | | Required | Type | Description ----- | ----- | ----- | ----- | ----- images | | Array| A 1D or a 2D Array of images. (2D) Images in Zero Index will be the secondary thumbnails height | | Integer/String | This will set the total height of the chart. width | | Integer/String | This will set override the width of the chart. main | | | object | This is the config object for the main thumbnails

  • | orientation | Enum | 'vertical' or 'horizontal' will change the flow of image thumbnails
  • | overlay | Boolean | If set, the image thumbnails will not be given gutter padding
  • | posY | Enum | 'top' or 'bot' will shift where the thumbnails are positioned
  • | posX | Enum | 'left' or 'right' will shift where the thumbnails are positioned
  • | spacing | Integer | Distance between image thumbnails
  • | size | Integer | Sets the size of the thumbnails
  • | hlColor | String | Accepts CSS colors (Hex/Names)
  • | hlSize | Integer | Sets the size of the thumbnail's highlight glow effect style | | Object | Style that is passed to SVG. wrapStyle | | Object | Style 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