# react-appear

> Trigger transitions on your components when they become visible in the viewport

Latest version **1.0.1** (published 2017-05-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-appear
pnpm add react-appear
yarn add react-appear
bun add react-appear
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-05-15 |
| First published | 2016-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 8 |
| Author | Julien Bouquillon |
| Maintainers | revolunet |
| Keywords | react, reactjs, appear, viewport, scroll |

## Links

- npm: https://www.npmjs.com/package/react-appear
- Repository: https://github.com/revolunet/react-appear
- Homepage: https://revolunet.github.io/react-appear/
- Issues: https://github.com/revolunet/react-appear/issues
- npm.io page: https://npm.io/package/react-appear

## Dependencies (2)

- [classnames](https://npm.io/package/classnames.md) ^2.2.5
- [in-viewport](https://npm.io/package/in-viewport.md) ^3.4.1

## 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.1 (latest) — 2017-05-15
- 1.0.0 — 2016-08-30

## README

# react-appear

Use [in-viewport](https://www.npmjs.com/package/in-viewport) to trigger transitions on your components when they become visible in the viewport

`npm i -S react-appear`

See the [demo](http://revolunet.github.io/react-appear)

## Usage

```jsx
const Example = () => (
  <Appear className='MyTransition'>
    <img src="http://placekitten.com/g/200/300"/>
  </Appear>
)
```

Initially, your component will be wrapped in `<div class="MyTransition"></div>`.

When entering the viewport, the div will get additional `MyTransition--inViewport` className.

You need to define the CSS rules, example :

```css
.MyTransition {
  opacity: 0;
  transition: all 0.5s ease-out;
}

.MyTransition--inViewport {
  opacity: 1;
}
```

## License

*react-appear* is available under MIT. See LICENSE for more details.

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