react-auto-infinite-slider
v1.0.5
Published
React Auto Infinite Slider
Readme
React Auto Infinite Slider
A simple, customizable infinite image slider component for React.
Installation
You can install the package via npm:
npm install react-auto-infinite-slider
Usage
Import the slider in your component:
import Slider from 'react-auto-infinite-slider';
import "react-auto-infinite-slider/dist/index.css";
const images = ['image1.jpg', 'image2.jpg', 'image3.jpg'];
function App() {
return (
<Slider images={images} width={600} height={400} velocity={5} reverse={true} />
);
}Props
- images (string[]): An array of image URLs.
- width (number): The width of the slider.
- height (number): The height of the slider.
- reverse (boolean, optional): Whether to reverse the animation direction. Default is false.
- velocity (number): The speed of the animation (in seconds).
