# react-stack-gallery

> A simple component for React that provides gallery like 'pinterest'

Latest version **1.0.4** (published 2019-12-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-stack-gallery
pnpm add react-stack-gallery
yarn add react-stack-gallery
bun add react-stack-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.4 |
| Published | 2019-12-21 |
| First published | 2019-11-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | hktysk |
| Maintainers | hktysk |
| Keywords | react, gallery, pinterest |

## Links

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

## Dependencies (1)

- [react-resize-observer](https://npm.io/package/react-resize-observer.md) ^1.1.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2019-12-21
- 1.0.3 — 2019-12-21
- 1.1.0 — 2019-11-29
- 1.0.1 — 2019-11-15
- 1.0.0 — 2019-11-09

## README

<p align="center">
  <img src="https://github.com/hktysk/images/blob/master/react-stack-gallery/screen-shot.jpg?raw=true">
</p>

# *react-stack-gallery*
> A simple component for React that provides gallery like 'pinterest'

[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
[![Maintainability](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/maintainability)](https://codeclimate.com/github/hktysk/react-stack-gallery)

### Tech
* [Node.js](https://github.com/nodejs/node)
* [React](https://github.com/facebook/react)
* [TypeScript](https://github.com/microsoft/TypeScript)
* [webpack](https://github.com/webpack/webpack)
* [Jest](https://github.com/facebook/jest)
* [enzyme](https://github.com/airbnb/enzyme)

### Installation
```sh
npm install [--save-dev] react-stack-gallery
```

### Usage
```js
import React from 'react'
import Gallery from 'react-stack-gallery'

const App = () => {
  return (
    <Gallery>
      <img src="1.jpg" style={{width: '100%'}} />
      <img src="2.jpg" style={{width: '100%'}} />
      <img src="3.jpg" style={{width: '100%'}} />
    </Gallery>
  )
}

export default App
```

or

```js
import React from 'react'
import Gallery from 'react-stack-gallery'

const App = () => {
  return (
    <Gallery>
      <div className="image" style={{width: '100%'}}>element</div>
      <div className="image" style={{width: '100%'}}>element</div>
      <div className="image" style={{width: '100%'}}>element</div>
    </Gallery>
  )
}

export default App
```

**TypeScript:**

```js
import React from 'react'
import Gallery from 'react-stack-gallery'

const App: React.FC = () => {
  return (
    <Gallery>
      <img src="1.jpg" style={{width: '100%'}} />
      <img src="2.jpg" style={{width: '100%'}} />
      <img src="3.jpg" style={{width: '100%'}} />
    </Gallery>
  )
}

export default App
```

### Props
```js
<Gallery screen={1200} lines={5} marginPerc={0.03}>
```
| props | description |
| --- | --- |
| screen | Specify the overall width in px. (default: window.innerWidth) |
| lines | The number of items to be placed side by side.(default: 2) |
| marginPerc | Set the margin. (default: 0.04) |

### Example
```sh
$ git clone git://github.com/hktysk/react-stack-gallery.git
$ cd react-stack-gallery
$ npm start
```

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