1.0.2 • Published 11 months ago

easy-react-text-loop v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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

PropTypeDefaultDefinition
intervalnumber | array2500The frequency (in ms) that the words change.
childrennodeThe words you want to loop (required)
animationenumspringAnimation 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.