# react-3d-gallery

> a react 3d gallery component

Latest version **0.2.0** (published 2017-08-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-3d-gallery
pnpm add react-3d-gallery
yarn add react-3d-gallery
bun add react-3d-gallery
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2017-08-18 |
| First published | 2017-08-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | jinke.li |
| Maintainers | jinke.li |
| Keywords | react, reactjs, css3, 3d, gallery, component |

## Links

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

## Dependencies (4)

- [react](https://npm.io/package/react.md) 15.x
- [react-dom](https://npm.io/package/react-dom.md) 15.x
- [classnames](https://npm.io/package/classnames.md) ^2.2.5
- [react-icons](https://npm.io/package/react-icons.md) ^2.2.5

## 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

- 0.2.0 (latest) — 2017-08-18
- 0.1.1 — 2017-08-13
- 0.1.0 — 2017-08-13

## README

# react-3d-gallery
a react 3d gallery component 


## Installation
```
npm install react-3d-gallery --save
```

## Example
### [Live Demo](https://lijinke666.github.io/react-3d-gallery/)
```
git clone https://github.com/lijinke666/react-3d-gallery.git
```
```
npm run demo
```

```javascript
import React from "react"
import ReactDOM from "react-dom"
import Gallery3d from "react-3d-gallery"


const cover = (id) => ({
    href:"https://www.github.com",
    cover: "http://p1.music.126.net/PQsm4zVDlbCeNACgW1j3QA==/18831335650676452.jpg?param=400y400",
    mask: (
        <div className="photo-cover">
            <h4 key="photo-title" className="cover-title">title{id+1}</h4>
            <p key="photo-content" className="cover-content">content{id+1}</p>
        </div>
    ),

})
const categories = [...new Array(8)].map((item, i) => { item = cover(i); return item })

const options = {
    categories,
    width: 400,
    height: 400,
    speed:1000,     
    autoPlay: true,
    autoPlaySpeed: 4000,
    space: 20,
    arrow: true,
    backfaceVisibility: false
}

const Demo = () => (
    <Gallery3d {...options} style={{ "margin": "50px auto" }} />

)
ReactDOM.render(
    <Demo />,
    document.getElementById('root')
)
```

### options
--- 
- #### categories
  - type : `Array`
  - default : `300`
  - explain : `gallery categories object[]`
    - options.href : type : `String` `target href`
    - options.cover : type : `String` `gallary cover`
    - options.mask : type : `String | ReactNode` `gallary mask`
- #### width
  - type : `Number`
  - default : `300`
  - explain : `cover width (px)`
- #### height
  - type : `Number`
  - default : `300`
  - explain : `cover height (px)`
- #### space
  - type : `Number`
  - default : `30`
  - explain : `The time required to convert (ms)`
- #### autoPlay
  - type : `Boolean`
  - default : `true`
  - explain : `Whether to scroll automatically`
- #### autoPlaySpeed
  - type : `Number`
  - default : `4000`
  - explain : `auto play speed (ms)`
- #### arrow
  - type : `Boolean`
  - default : `true`
  - explain : `Whether to show the arrow of the gallery`
- #### backfaceVisibility
  - type : `Boolean`
  - default : `true`
  - explain : `Whether to show backface visibility of the gallery`
 ---

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