# react-photos-grid

> Justified photos grid react component

Latest version **0.0.6** (published 2019-05-11) · Apache 2.0 license · 0 weekly downloads

## Install

```sh
npm install react-photos-grid
pnpm add react-photos-grid
yarn add react-photos-grid
bun add react-photos-grid
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2019-05-11 |
| First published | 2019-01-14 |
| Weekly downloads | 0 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 1 |
| Unpacked size | 532.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | walkes |
| Maintainers | walkes |

## Links

- npm: https://www.npmjs.com/package/react-photos-grid
- Repository: https://github.com/walkes/react-photos-grid
- Homepage: https://github.com/walkes/react-photos-grid#readme
- Issues: https://github.com/walkes/react-photos-grid/issues
- npm.io page: https://npm.io/package/react-photos-grid

## Dependencies (1)

- [react-sizeme](https://npm.io/package/react-sizeme.md) ^2.5.2

## Recent versions

- 0.0.6 (latest) — 2019-05-11
- 0.0.5 — 2019-01-20
- 0.0.4 — 2019-01-17
- 0.0.3 — 2019-01-16
- 0.0.2 — 2019-01-15
- 0.0.1 — 2019-01-14

## README

# react-photos-grid

> Justified photos grid react component

[![NPM](https://img.shields.io/npm/v/react-photos-grid.svg)](https://www.npmjs.com/package/react-photos-grid)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![Build Status](https://travis-ci.org/walkes/react-photos-grid.svg?branch=master)](https://travis-ci.org/walkes/react-photos-grid)

[Demo](https://walkes.github.io/react-photos-grid/)



## Install

```bash
npm install --save react-photos-grid
```

## Usage

```tsx
import * as React from 'react'

import PhotoGrid from 'react-photos-grid'

class Example extends React.Component {

    const photos = new Array(50).fill(undefined).map(() => {
      const width = Math.floor(Math.random() * (500 - 300)) + 300
      const ratio = Math.floor(Math.random() * (1.8 - 0.5)) + 0.5
      const height = Math.floor(width * ratio)
      return {
        src: 'https://picsum.photos/' + width + '/' + height,
        width: width,
        height: height,
      }
    })

    return (
      <PhotoGrid photos={photos} optimalHeight={400} ImageComponent={this.component}/>
    )

  }

}
```

## License

Apache 2.0 © [walkes](https://github.com/walkes)

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