# react-fullscreen-gallery

> Beautiful, easy-to-use gallery for React.

Latest version **1.0.10** (published 2017-02-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-fullscreen-gallery
pnpm add react-fullscreen-gallery
yarn add react-fullscreen-gallery
bun add react-fullscreen-gallery
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.10 |
| Published | 2017-02-13 |
| First published | 2017-01-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Santiago de Leon |
| Maintainers | sdeleon28 |

## Links

- npm: https://www.npmjs.com/package/react-fullscreen-gallery
- Repository: https://github.com/sdeleon28/react-fullscreen-gallery
- Homepage: https://github.com/sdeleon28/react-fullscreen-gallery#readme
- Issues: https://github.com/sdeleon28/react-fullscreen-gallery/issues
- npm.io page: https://npm.io/package/react-fullscreen-gallery

## Dependencies (6)

- [react](https://npm.io/package/react.md) ^15.4.1
- [jquery](https://npm.io/package/jquery.md) ^3.1.1
- [react-dom](https://npm.io/package/react-dom.md) ^15.4.1
- [jscrollpane](https://npm.io/package/jscrollpane.md) ^2.0.22
- [imagesloaded](https://npm.io/package/imagesloaded.md) ^4.1.1
- [copy-webpack-plugin](https://npm.io/package/copy-webpack-plugin.md) ^4.0.1

## Recent versions

- 1.0.10 (latest) — 2017-02-13
- 1.0.9 — 2017-02-05
- 1.0.8 — 2017-01-29
- 1.0.5 — 2017-01-28
- 1.0.4 — 2017-01-28
- 1.0.3 — 2017-01-28
- 1.0.2 — 2017-01-28
- 1.0.1 — 2017-01-28
- 1.0.0 — 2017-01-27

## 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/](https://sdeleon28.github.io/react-fullscreen-gallery/)

Or you can try it locally by running: 

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

Then open [http://localhost:8080/react-fullscreen-gallery/](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:

```js
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](https://github.com/xiaolin/react-image-gallery) or [react-photo-gallery](https://github.com/neptunian/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](http://www.imagemagick.org/script/index.php):

```bash
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.

---
_Source: https://npm.io/package/react-fullscreen-gallery · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
