# react-fade-in

> Super-easy fade-in animation for react children

Latest version **2.0.1** (published 2021-01-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-fade-in
pnpm add react-fade-in
yarn add react-fade-in
bun add react-fade-in
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2021-01-29 |
| First published | 2017-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 251 |
| Author | Graham Kaemmer |
| Maintainers | gkaemmer |

## Links

- npm: https://www.npmjs.com/package/react-fade-in
- Repository: https://github.com/gkaemmer/react-fade-in
- Homepage: https://github.com/gkaemmer/react-fade-in#readme
- Issues: https://github.com/gkaemmer/react-fade-in/issues
- npm.io page: https://npm.io/package/react-fade-in

## Recent versions

- 2.0.1 (latest) — 2021-01-29
- 2.0.0-beta.1 (beta) — 2021-01-12
- 2.0.0 — 2021-01-12
- 2.0.0-beta.0 — 2021-01-11
- 1.1.1 — 2020-10-13
- 1.1.0 — 2020-06-02
- 1.0.0 — 2020-04-27
- 0.1.8 — 2020-01-17
- 0.1.7 — 2019-12-14
- 0.1.6 — 2018-05-16
- 0.1.5 — 2017-08-31
- 0.1.4 — 2017-05-08

## README

# react-fade-in

Dead-simple and opinionated component to fade in an element's children.

![React Fade In](/example/example.gif)

## Installation

`npm install react-fade-in`

## Usage

`react-fade-in`

```
import FadeIn from 'react-fade-in';
// ...
<FadeIn>
  <div>Element 1</div>
  <div>Element 2</div>
  <div>Element 3</div>
  <div>Element 4</div>
  <div>Element 5</div>
  <div>Element 6</div>
</FadeIn>
```

## API

### `FadeIn`

Animates its children, one by one.

> **Note**: To have children animate separately, they must be first-level children of the `<FadeIn>` component (i.e. members of its `props.children`).

#### Props

- `delay`: Default: 50. Delay between each child's animation in milliseconds.
- `transitionDuration`: Default: 400. Duration of each child's animation in milliseconds.
- `className`: No default. Adds a `className` prop to the container div.
- `childClassName`: No default. Adds a `className` prop to each child div, allowing you to style the direct children of the `FadeIn` component.
- `wrapperTag`: Default: `"div"`. Override the HTML element of the wrapping div.
- `childTag`: Default: `"div"`. Override the HTML element wrapped around each child element.
- `visible`: **New in 2.0.0**: If not `undefined`, the `visible` prop can be used to control when the fade in occurs. If set to `false` after the fade-in animation completes, the children will fade out one by one.
- `onComplete`: **New in 2.0.0**: specifies a callback to be called when the animation completes.

Happy fading.

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