4.6.9 • Published 7 months ago

infinite-auto-slider v4.6.9

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

Infinite Auto Slider

A customizable infinite image slider that loops infinitely with an optional hover pause feature. This package allows you to create smooth and seamless scrolling carousels for images with infinite looping and customizable styles.

Features

  • Infinite scrolling of images.
  • Optional hover pause to stop scrolling when the user hovers over the slider.
  • Seamless loop to avoid sudden jumps when the first loop finishes.
  • Easy to integrate with React projects.
  • Lightweight and minimal styling.

Installation

To install the infinite-auto-slider package, run the following command:

Using npm:

npm install infinite-auto-slider

Example:

import InfiniteSlider from "infinite-auto-slider";
import "infinite-auto-slider/dist/index.css";


const images = [
  { name: "uni1", src: "/path/to/image1.png" },
  { name: "uni2", src: "/path/to/image2.png" },
  { name: "uni3", src: "/path/to/image3.png" },
  // Add more images as needed
];

export default function YourComponent() {
  return (
    <div>
      <InfiniteSlider images={images} onHoverPause={true} />
    </div>
  );
}

The slider includes basic styling by default, but you can also import the default styles in your project:

import "infinite-auto-slider/dist/index.css";