# @ej-hooks/use-fade-in

> React Hook to fade in any element.

Latest version **1.0.0** (published 2021-08-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ej-hooks/use-fade-in
pnpm add @ej-hooks/use-fade-in
yarn add @ej-hooks/use-fade-in
bun add @ej-hooks/use-fade-in
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-08-08 |
| First published | 2021-08-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Eunjin Kwon |
| Maintainers | eunjinfizz |
| Keywords | react, hooks, fade-in, react-hooks |

## Links

- npm: https://www.npmjs.com/package/@ej-hooks/use-fade-in
- Repository: https://github.com/eunjinfizz/react-hooks
- Homepage: https://github.com/eunjinfizz/react-hooks#readme
- Issues: https://github.com/eunjinfizz/react-hooks/issues
- npm.io page: https://npm.io/package/@ej-hooks/use-fade-in

## 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.0 (latest) — 2021-08-08

## README

# @ej-hooks/use-fade-in

React Hook to fade in any element.

## Installation

#### yarn

`yarn add @ej-hooks/use-fade-in`

#### npm

`npm i @ej-hooks/use-fade-in`

## Usage

```js
import React from 'react';
import useFadeIn from '@ej-hooks/use-fade-in';
function App() {
  const fadeIn = useFadeIn(5, 10);
  return <h1 {...fadeIn}>This will fade in.</h1>;
}
```

### Arguments

| Argument | Type   | Description                                     | Required | Default value |
| -------- | ------ | ----------------------------------------------- | -------- | ------------- |
| duration | number | Sets the duration of the transition. In seconds | no       | 1             |
| delay    | number | Delays of transition's start. In seconds        | no       | 0             |

### Return

| Return value | Type      | Description                         | Default value |
| ------------ | --------- | ----------------------------------- | ------------- |
| ref          | React Ref | A ref created to fadeIn the element | null          |
| style        | Object    | Style object                        | `{opacity:0}` |

It's recommended to just spread the returned object on the element as shown in the Usage section above.

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