Install
npm i react-appear-in
Oryarn add react-appear-in
react >=16.8.0 is required as peer dependency.
Use
import AppearIn from 'react-appear-in';
const MyAwesomeComponent = () => (
<AppearIn minutes={1} seconds={20} milliseconds={10}>
Hello in 1 minute, 20 seconds and 10 milliseconds
</AppearIn>
);
Props
Prop | Type | Notes |
---|---|---|
minutes | number | Optional |
seconds | number | Optional |
milliseconds | number | Optional |
placeholder | (time: number) => ReactNode | Optional. time is in milliseconds. |
onAppear | (time: number) => void | Optional. time is in milliseconds. |
Demo
See other projects