Get the latest version from NPM:
$ npm install @splidejs/react-splide
Import CSS and components:
import { Splide, SplideSlide } from '@splidejs/react-splide';
import '@splidejs/react-splide/css';
export function Slider() {
return (
<Splide options={ { rewind: true } } aria-label="React Splide Example">
<SplideSlide>
<img src="https://github.com/Splidejs/react-splide/raw/master/image1.jpg" alt="Image 1"/>
</SplideSlide>
<SplideSlide>
<img src="https://github.com/Splidejs/react-splide/raw/master/image2.jpg" alt="Image 2"/>
</SplideSlide>
</Splide>
);
}
Visit here for more details.
Please support the project if you like it!
React Splide and Splide are released under the MIT license. © 2021 Naotoshi Fujita