2.0.5 • Published 3 years ago
@rcnoverwatcher/react-fade-in-react-18 v2.0.5
react-fade-in
Fork of https://github.com/gkaemmer/react-fade-in to support react 18 (old project was likely abandoned)
Dead-simple and opinionated component to fade in an element's children.

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 itsprops.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 aclassNameprop to the container div.childClassName: No default. Adds aclassNameprop to each child div, allowing you to style the direct children of theFadeIncomponent.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 notundefined, thevisibleprop can be used to control when the fade in occurs. If set tofalseafter 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.