# @feizheng/react-smart-photo

> The most easy to use responsive image viewer especially for mobile devices for react.

Latest version **1.0.0** (published 2020-05-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @feizheng/react-smart-photo
pnpm add @feizheng/react-smart-photo
yarn add @feizheng/react-smart-photo
bun add @feizheng/react-smart-photo
```

## 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.0 |
| Published | 2020-05-07 |
| First published | 2020-05-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 19.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | afei |
| Maintainers | afeiship |
| Keywords | react, component |

## Links

- npm: https://www.npmjs.com/package/@feizheng/react-smart-photo
- Repository: https://github.com/afeiship/react-smart-photo
- Homepage: https://github.com/afeiship/react-smart-photo#readme
- Issues: https://github.com/afeiship/react-smart-photo/issues
- npm.io page: https://npm.io/package/@feizheng/react-smart-photo

## Dependencies (6)

- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2
- [smartphoto](https://npm.io/package/smartphoto.md) ^1.6.1
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^9.7.4
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.1
- [@feizheng/noop](https://npm.io/package/@feizheng/noop.md) ^1.0.0

## 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.0 (latest) — 2020-05-07

## README

# react-smart-photo
> The most easy to use responsive image viewer especially for mobile devices for react.

## installation
```shell
npm install -S @feizheng/react-smart-photo
```

## update
```shell
npm update @feizheng/react-smart-photo
```

## properties
| Name      | Type   | Required | Default | Description                                                     |
| --------- | ------ | -------- | ------- | --------------------------------------------------------------- |
| className | string | false    | -       | The extended className for component.                           |
| name      | string | false    | -       | The group name.                                                 |
| items     | array  | false    | []      | Image source set.                                               |
| options   | object | false    | -       | SmartPhoto options. see: https://github.com/appleple/SmartPhoto |


## usage
1. import css
  ```scss
  @import "~@feizheng/react-smart-photo/dist/style.scss";
  @import "~smartphoto/scss/smartphoto.scss";

  // customize your styles:
  $react-smart-photo-options: ()
  ```
2. import js
  ```js
  import ReactSmartPhoto from '@feizheng/react-smart-photo';
  import ReactDOM from 'react-dom';
  import React from 'react';
  import './assets/style.scss';

  class App extends React.Component {
    render() {
      return (
        <div className="app-container">
          <ReactSmartPhoto
            name="g1"
            items={[
              {
                href: 'http://himg.bdimg.com/sys/portrait/item/be10475f686d6c73db00.jpg',
                src: 'http://himg.bdimg.com/sys/portrait/item/be10475f686d6c73db00.jpg',
                id: '80'
              }
            ]}
          />

          <hr />

          <ReactSmartPhoto
            name="g2"
            items={[
              {
                href: 'http://himg.bdimg.com/sys/portrait/item/be10475f686d6c73db00.jpg',
                src: 'http://himg.bdimg.com/sys/portrait/item/be10475f686d6c73db00.jpg',
                id: '80'
              },
              {
                href: 'http://himg.bdimg.com/sys/portrait/item/be10475f686d6c73db00.jpg',
                src: 'http://himg.bdimg.com/sys/portrait/item/be10475f686d6c73db00.jpg',
                id: '80'
              },
              {
                href: 'http://himg.bdimg.com/sys/portrait/item/be10475f686d6c73db00.jpg',
                src: 'http://himg.bdimg.com/sys/portrait/item/be10475f686d6c73db00.jpg',
                id: '80'
              },
              {
                href: 'http://himg.bdimg.com/sys/portrait/item/be10475f686d6c73db00.jpg',
                src: 'http://himg.bdimg.com/sys/portrait/item/be10475f686d6c73db00.jpg',
                id: '80'
              }
            ]}
          />
        </div>
      );
    }
  }

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

  ```

## documentation
- https://afeiship.github.io/react-smart-photo/

## resources
- https://github.com/appleple/SmartPhoto

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