splide-nextjs
v2.4.23
Published
This temporary project fixes the "window is not defined" error when using SSR. When the original package is patched this package and repository will be deprecated.
Downloads
1,091
Readme
Splide | SSR
Splide is a lightweight, powerful and flexible slider and carousel, written in pure JavaScript without any dependencies.
Why? (https://github.com/Splidejs/splide/pull/296)
This temporary project fixes the "window is not defined" error when using SSR. When the original package is patched this package and repository will be deprecated.
Install
npm i splide-nextjs --save
yarn add splide-nextjs
Import
import { Splide, SplideSlide } from 'splide-nextjs/react-splide';
import 'splide-nextjs/splide/dist/css/themes/splide-default.min.css';
// or
import 'splide-nextjs/splide/dist/css/themes/splide-sea-green.min.css';
// or
import 'splide-nextjs/splide/dist/css/themes/splide-skyblue.min.css';