# react-google-photo

> React lightbox component using the google photo style

Latest version **1.2.1** (published 2021-04-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-google-photo
pnpm add react-google-photo
yarn add react-google-photo
bun add react-google-photo
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2021-04-06 |
| First published | 2017-11-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 117 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | Pradel Léo |
| Maintainers | leopradel |
| Keywords | react, google, photo, image, lightbox, responsive |

## Links

- npm: https://www.npmjs.com/package/react-google-photo
- Repository: https://github.com/pradel/react-google-photo
- Homepage: https://github.com/pradel/react-google-photo#readme
- Issues: https://github.com/pradel/react-google-photo/issues
- npm.io page: https://npm.io/package/react-google-photo

## Dependencies (3)

- [no-scroll](https://npm.io/package/no-scroll.md) ^2.1.1
- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [screenfull](https://npm.io/package/screenfull.md) ^5.0.2

## 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.2.1 (latest) — 2021-04-06
- 1.2.0 — 2020-05-12
- 1.1.0 — 2020-05-12
- 1.0.0 — 2020-05-11
- 0.1.0 — 2018-05-08
- 0.0.2 — 2018-04-20
- 0.0.1 — 2017-11-12

## README

# react-google-photo

[![npm version](https://img.shields.io/npm/v/react-google-photo)](https://www.npmjs.com/package/react-google-photo)
[![npm downloads](https://img.shields.io/npm/dm/react-google-photo)](https://www.npmjs.com/package/react-google-photo)
[![license](https://img.shields.io/github/license/pradel/react-google-photo)](https://github.com/pradel/react-google-photo/blob/master/LICENSE)

react-google-photo is a responsive lightbox React Component for displaying photos that implements the google photo style.

- Responsive.
- Keyboard navigation.
- Easily customizable via props.

## Documentation

📚 You can find the docs and live examples [here](https://react-google-photo.leopradel.com/).

- [Getting started](https://react-google-photo.leopradel.com/)
  - [Installation](https://react-google-photo.leopradel.com/#installation)
  - [Usage](https://react-google-photo.leopradel.com/#usage)
  - [Props](https://react-google-photo.leopradel.com/#props)
  - [Licence](https://react-google-photo.leopradel.com/#license)

## Installation

With npm:

```
npm install react-google-photo --save
```

Or with yarn:

```
yarn add react-google-photo
```

## Usage

```javascript
import React from 'react';
import ReactDOM from 'react-dom';
import 'react-google-photo/styles.css';
import GooglePhoto from 'react-google-photo';

const App = () => {
  const [open, setOpen] = React.useState(false);

const images = [
    {
      src:
        'https://images.unsplash.com/photo-1509420316987-d27b02f81864?dpr=1&auto=format&fit=crop&w=1500&q=80&cs=tinysrgb&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D',
      width: 1500,
      height: 1000,
    },
    ...
  ];

  return (
    <div>
      <button onClick={this.handleOpen}>Open</button>
      <GooglePhoto
        open={open}
        src={images}
        onClose={this.handleClose}
      />
    </div>
  );
};

ReactDOM.render(<App />, document.getElementById('app'));
```

## Props

Check the documentation: https://react-google-photo.leopradel.com/#props.

## License

MIT © [Léo Pradel](https://www.leopradel.com/)

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