# react-delayed

> Small component for delaying the mounting and unmounting of a child component for CSS animation purposes.

Latest version **0.2.3** (published 2018-06-22) · MIT license · 0 weekly downloads

## Install

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

## 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.3 |
| Published | 2018-06-22 |
| First published | 2017-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 79.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21 |
| Author | Adam Timberlake |
| Maintainers | wildhoney |
| Keywords | delayed, deferred, delay, delay, render, mount, unmount, css, animation, transition |

## Links

- npm: https://www.npmjs.com/package/react-delayed
- Repository: https://github.com/Wildhoney/ReactDelayed
- Homepage: https://github.com/Wildhoney/ReactDelayed#readme
- Issues: https://github.com/Wildhoney/ReactDelayed/issues
- npm.io page: https://npm.io/package/react-delayed

## 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.2.3 (latest) — 2018-06-22
- 0.2.2 — 2018-06-22
- 0.2.1 — 2018-04-26
- 0.2.0 — 2017-05-14
- 0.1.2 — 2017-05-13
- 0.1.0 — 2017-05-13

## README

# React Delayed

> Small component for delaying the mounting and unmounting of a child component for CSS animation purposes.

![Travis](http://img.shields.io/travis/Wildhoney/ReactDelayed.svg?style=flat-square)
&nbsp;
![Coveralls](https://img.shields.io/coveralls/Wildhoney/ReactDelayed.svg?style=flat-square)
&nbsp;
![npm](http://img.shields.io/npm/v/react-delayed.svg?style=flat-square)
&nbsp;
![License MIT](https://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat-square)

* **npm**: `npm i react-delayed --save`
* **Heroku**: [http://react-delayed.herokuapp.com/](http://react-delayed.herokuapp.com/)

---

## Getting Started

Use the optional `mountAfter` and `unmountAfter` props for delaying the mounting and unmounting of nested components.

```javascript
<Delayed mounted={true} mountAfter={500} unmountAfter={500}>
    <img src="./images/nyan.gif" alt="Nyan" />
</Delayed>
```

When `mounted` is `false` a dummy node will be rendered, which defaults to `span` and can be changed with the `nodeName` prop.

You're also able to pass a *thunk* as the `children` for truly deferred components.

```javascript
<Delayed mounted={true} mountAfter={500} unmountAfter={500}>
    {() => <img src="./images/nyan.gif" alt="Nyan" />}
</Delayed>
```

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