Skip to content

easy-react-text-loop is a React component that allows you to easily create text loops with a nice fade animation.

License

Notifications You must be signed in to change notification settings

josephgoksu/easy-react-text-loop

Repository files navigation

Easy React Text Loop

text-loop2

easy-react-text-loop is a React component that allows you to easily create text loops with a nice fade animation.

module formats: umd, cjs, and esm

npm version npm downloads MIT License PRs Welcome


Installation

npm install --save easy-react-text-loop

or

yarn add easy-react-text-loop

or

pnpm add easy-react-text-loop

Usage

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>
  );
};

Props

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

Contributing

Please follow our contributing guidelines.

License

MIT

Author

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.