Home

react-generic-animate 0.0.133

Project Status

npm npm downloads

build build push package

check types lint

deploy web documentation web documentation

Use case

Generic react animation component.

Content

Installation

You can install via package manager or simply download the compiled version as zip file here and inject:

npm install react-generic-animate

Example

import {GenericAnimate} from 'react-generic-animate'

const Application = () => {
    const [fadeState, setFadeState] = useState(false)

    useEffect((): (() => void) => timeout(
        () => {
            setFadeState((value: boolean) => !value)
        },
        2 * 1000
    ).clear)

    return <div>
        <GenericAnimate in={fadeState} timeout={2000}>Fade it!</GenericAnimate>

        <br/>

        <GenericAnimate children="Fade it!" in={!fadeState} timeout={2000} />
    </div>
}