# react-css-animated

> react css animation based on animate.css

Latest version **2.0.0** (published 2020-03-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-css-animated
pnpm add react-css-animated
yarn add react-css-animated
bun add react-css-animated
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-03-06 |
| First published | 2018-07-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 215.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 14 |
| Author | AleksandrLv |
| Maintainers | alexanderlv, kkateivanova |

## Links

- npm: https://www.npmjs.com/package/react-css-animated
- Repository: https://github.com/AleksandrLv/react-css-animated
- Homepage: https://github.com/AleksandrLv/react-css-animated#readme
- Issues: https://github.com/AleksandrLv/react-css-animated/issues
- npm.io page: https://npm.io/package/react-css-animated

## Dependencies (3)

- [node-sass](https://npm.io/package/node-sass.md) ^4.9.3
- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [animate.css](https://npm.io/package/animate.css.md) ^3.6.1

## Recent versions

- 2.0.0 (latest) — 2020-03-06
- 1.1.4 — 2018-10-26
- 1.1.3 — 2018-10-25
- 1.1.2 — 2018-10-05
- 1.1.1 — 2018-10-03
- 1.0.0 — 2018-07-19

## README

# react-css-animated

> React css animation based on animate.css

[![NPM](https://img.shields.io/npm/v/react-css-animated.svg)](https://www.npmjs.com/package/react-css-animated) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save react-css-animated
```

## Usage

```jsx
import React, { Component } from 'react';

import Animated from 'react-css-animated';

class Title extends Component {
  render () {
    return (
      <Animated animateOnMount>
        <h1>Animate</h1>
      </Animated>
    );
  }
}
```

## propTypes
```jsx
Animated.propTypes = {
  className: PropTypes.string,
  innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
  tag: PropTypes.string,
  style: PropTypes.object,
  isVisible: PropTypes.bool,
  /* you can use your own animations */
  animations: PropTypes.object,
  /* eslint-disable react/no-unused-prop-types */
  /* These props are used in an external function getAnimatedState */
  animationIn: PropTypes.string,
  animationOut: PropTypes.string,
  delay: timeShape,
  duration: timeShape,
  easing: easingShape,
  /* eslint-enable */
  animateOnMount: PropTypes.bool,
  children: PropTypes.node,
  /*
    renderContent description:
    Elements always come new, so there is a reason to rerender.
    To avoid rerender use the function renderContent instead children.
  */
  renderContent: PropTypes.func,
  data: PropTypes.any,
  onClick: PropTypes.func,
};

Animated.defaultProps = {
  tag: 'div',
  style: {},
  animations: {},
  isVisible: true,
  animationIn: 'fadeIn',
  animationOut: 'fadeOut',
  delay: 0,
  duration: 300,
  easing: 'ease',
  animateOnMount: false,
};

const timeShape = PropTypes.oneOfType([
  PropTypes.number,
  PropTypes.shape({
    in: PropTypes.number,
    out: PropTypes.number,
  }).isRequired,
]);

const easingShape = PropTypes.oneOfType([
  PropTypes.string,
  PropTypes.shape({
    in: PropTypes.string,
    out: PropTypes.string,
  }).isRequired,
]);
```


## License

MIT © [Alexander Lyalikhov](https://github.com/AleksandrLv)

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