# box-3d-animate

> Generator 3d box and animate for React component

Latest version **0.3.4** (published 2018-11-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install box-3d-animate
pnpm add box-3d-animate
yarn add box-3d-animate
bun add box-3d-animate
```

## 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.3.4 |
| Published | 2018-11-24 |
| First published | 2018-11-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 94.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Carlos Manotas |
| Maintainers | carlosmanotas |
| Keywords | react-component, 3d, animate, css, box, styled-components |

## Links

- npm: https://www.npmjs.com/package/box-3d-animate
- Repository: https://github.com/CarlosManotas/box-3d-animate
- Homepage: https://github.com/CarlosManotas/box-3d-animate#readme
- Issues: https://github.com/CarlosManotas/box-3d-animate.git/issues
- npm.io page: https://npm.io/package/box-3d-animate

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.3.4 (latest) — 2018-11-24
- 0.3.3 — 2018-11-24
- 0.3.2 — 2018-11-20
- 0.3.1 — 2018-11-20
- 0.3.0 — 2018-11-20
- 0.2.0 — 2018-11-20
- 0.1.0 — 2018-11-20

## README

# box-3d-animate

[![npm package][npm-badge]][npm]

*small contribution for those who work with react and styled-components*

`Box 3d animate` is just a library for create 3d box with your images.

![alt text][box-3d]

## Installation
> require react and styled-components
via yarn, just follow these simple commands:

```bash
$ yarn add box-3d-animate
```
or via npm:

```bash
$ npm install box-3d-animate --save
```

## Basic use

 import in your file `js`

```javascript
...
import CreateBox3D from "box-3d-animate";
// import your images
import frontSide from "./imageF.jpg";
import backSide from "./imageB.jpg"
import leftSide from "./imageL.jpg"
import rightSide from "./imageR.jpg"
import topSide from "./imageT.jpg"
...
render() {
  return (
    <CreateBox3D
      defaultWidth={200}
      frontSide={frontSide}
      backSide={backSide}
      leftSide={leftSide}
      rightSide={rightSide}
      topSide={topSide}
    />
  );
}
```
## Properties

| Property | Default | Type | Values |
|-----------------|---------|-------|----------|
| leftSide | https://via.placeholder.com/200 | String | url or import image |
| rightSide | https://via.placeholder.com/200 | String | url or import image |
| frontSide | https://via.placeholder.com/200 | String | url or import image |
| backSide | https://via.placeholder.com/200 | String | url or import image |
| topSide | https://via.placeholder.com/200 | String | url or import image |
| bottomSide | https://via.placeholder.com/200 | String | url or import image |
| perspective | 800px | String | 900px, 1200px, ... |
| perspectiveOrigin | 50% -150px | String | 30% 50em, ... |
| duration | 10s | String |  1s, 300ms... |
| timingFunction | linear | String | ease, ease-in, ease-out, ease-in-out, linear, step-start, step-end |
| iterationCount | infinite | String or Number | infinite or 0, 1, 3, ... |
| transformOrigin | 50% 50% -2em | String | center, 50%, top bottom, 10% 80% ...|
| direction | normal | String | normal, reverse, alternate, alternate-reverse |
| animationName | roundsY | String | rounds, roundsY, roundsX |
| defaultWidth | 200 | Number | 300, 150, ...|
| maxWidth | 150px | String | 200px, ... |
| margin | 5em auto auto | String | 1px, auto 0, 4px auto 5px, ... |
| shadowBottom | true | Boolean | true, false |
| loading | `<LoadingComponent />` | ReactNode | `<span>loading...</span>` ... |
| SSR | false | Boolean | true, false |

## Nextjs example
```javascript
...
import CreateBox3D from "box-3d-animate";
...
render() {
  return (
    <CreateBox3D
      SSR={true}
      ...
    />
  );
}
```

> Some examples [here](https://carlosmanotas.github.io/box-3d-animate/)

## License
Box 3d animate is licensed under the MIT license. (http://opensource.org/licenses/MIT)

[npm-badge]: https://img.shields.io/npm/v/box-3d-animate.png?style=flat-square
[npm]: https://www.npmjs.org/package/box-3d-animate

[box-3d]: https://github.com/CarlosManotas/box-3d-animate/blob/master/demo/src/box-3d-animate.gif

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