easy-react-text-loop is a React component that allows you to easily create text loops with a nice fade animation.
npm install --save easy-react-text-loop
or
yarn add easy-react-text-loop
or
pnpm add easy-react-text-loop
import { TextLoop } from "easy-react-text-loop";
const App = () => {
return (
<div>
I will loop through these words:{" "}
<TextLoop>
<span>hello</span>
<span>world</span>
<span>everyone</span>
</TextLoop>{" "}
and then start again!
</div>
);
};
Prop | Type | Default | Definition |
---|---|---|---|
interval | number | array | 2500 |
The frequency (in ms) that the words change. |
children | node | The words you want to loop (required) | |
animation | enum | spring |
Animation type |
Please follow our contributing guidelines.
I inspired from react-text-loop and easy-react-text-loop and I wanted to make it easier to use. I hope you like it.