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-fullscreen-gallery

v1.0.10

Published

Beautiful, easy-to-use gallery for React.

Downloads

39

Readme

react-fullscreen-gallery

Beautiful, easy-to-use gallery for React.

This gallery was originally designed to look good as a fullscreen component, but you can also confine it within a box of your choice.

Demo

See the live demo at https://sdeleon28.github.io/react-fullscreen-gallery/

Or you can try it locally by running:

git clone https://github.com/sdeleon28/react-fullscreen-gallery.git
npm install
npm run dev

Then open http://localhost:8080/react-fullscreen-gallery/ in your browser.

Getting started

Install with:

npm install react-fullscreen-gallery

Then set up your component like this:

import React from 'react';
import ReactDOM from 'react-dom';
import Gallery from 'react-fullscreen-gallery';

// Include jScrollPane styles (either like this or with a link in your HTML)
require('/path/to/node_modules/jscrollpane/style/jquery.jscrollpane.css');

const app = document.getElementById('app');

const images = [
  {
    imageUrl: require('../img/01.jpg'),
    thumbnailUrl: require('../img/01-thumb.jpg'),
    title: 'Image 01',
    alt: 'Image 01',
  },
  {
    imageUrl: require('../img/02.jpg'),
    thumbnailUrl: require('../img/02-thumb.jpg'),
    title: 'Image 02',
    alt: 'Image 02',
  },
];

ReactDOM.render(<Gallery images={images} />, app);

That's basically the only way to use the gallery (as of now). This gallery is simple by design. If you want something that you can configure more via props, you should probably check out react-image-gallery or react-photo-gallery.

If you'd like to change the styles, you'll have to brute-force some CSS in :-)

Generating thumbnails

This gallery is optimized to look good with thumbnails that are 75px tall. Assuming you have a set of jpg files in a folder, you can easily generate thumbnails for all of them using ImageMagick:

cd /path/to/pictures/
for f in *.jpg; do
    convert $f -thumbnail x75 "${f%.*}-thumb.jpg";
done

This will generate thumbnails that have a height of 75px and a proportional width.

Contributing

The usual stuff. PRs are welcome!

Roadmap

  • Thumbnails and title look small in mobile devices. Make them bigger.
  • Since the gallery doesn't load images up-front, transition between images is not exactly smooth. Make nicer transitions.
  • Support youtube videos.