@gwroger/react-splide

The React component for Splide using @gwroger/splidejs


Keywords
splide, slider, carousel, slideshow, lightweight, touch, responsive, react
License
MIT
Install
npm install @gwroger/react-splide@0.0.2

Documentation

my own version React Splide using @gwroger/splidejs

added wheelLtR option for horizontal detection

Quick Start

Get the latest version from NPM:

$ npm install @gwroger/react-splide

Import CSS and components:

import { Splide, SplideSlide } from "@gwroger/react-splide";
import "@gwroger/react-splide/css";

export function Slider() {
  return (
    <Splide
      options={{ rewind: true, wheel: true, wheelLtR: true }}
      aria-label="Example"
    >
      <SplideSlide>
        <img src="image1.jpg" alt="Image 1" />
      </SplideSlide>
      <SplideSlide>
        <img src="image2.jpg" alt="Image 2" />
      </SplideSlide>
    </Splide>
  );
}