A React component for creating smooth and customizable marquee animations, perfect for infinite scroll, carousels, tickers, and horizontal scrolling animations.
- Smooth scrolling animations
- Easy to integrate and customize
- Supports infinite scroll
- Lightweight and fast
- Written in TypeScript
Install the package using npm or yarn:
npm install react-marquee-animationor
yarn add react-marquee-animationHere's a basic example of how to use the react-marquee-animation component in your React application:
import React from 'react';
import Marquee from 'react-marquee-animation';
const App: React.FC = () => {
return (
<div>
<Marquee>
<div>Your content here</div>
<div>Another content</div>
<div>More content</div>
</Marquee>
</div>
);
};
export default App;The Marquee component supports the following props:
| Prop | Type | Default | Description |
|---|---|---|---|
speed |
number | 50 | The speed of the marquee animation. |
direction |
string | 'left' | The direction of the marquee ('left' or 'right'). |
pauseOnHover |
boolean | false | Pause the animation when hovered. |
loop |
boolean | true | Whether the marquee should loop indefinitely. |
children |
ReactNode | N/A | The content to be animated in the marquee. |
To contribute to the project or run it locally:
- Clone the repository:
git clone https://github.com/hyper-dot/react-marquee-animation.git
- Install dependencies:
cd react-marquee-animation npm install - Run the development server:
npm run dev
To build the package for production:
npm run buildTo lint the project:
npm run lintThis project is licensed under the MIT License. See the LICENSE file for more details.
Roshan Paudel
For any inquiries or issues, please contact rozanpoudel@gmail.com.
For more details, please visit the GitHub repository.