Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samline/splide-nextjs
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.
https://github.com/samline/splide-nextjs
Last synced: 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/samline/splide-nextjs
- Owner: samline
- Created: 2021-04-12T18:06:39.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-04-12T18:50:56.000Z (over 3 years ago)
- Last Synced: 2024-10-11T15:19:50.371Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 156 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Splide | SSR
**[Splide](https://splidejs.com/) is a lightweight, powerful and flexible slider and carousel, written in pure JavaScript without any dependencies.**
* [Demo](https://splidejs.com/)
* [Documents](https://splidejs.com/integration-react-splide/)## 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
```bash
npm i splide-nextjs --save
```
```bash
yarn add splide-nextjs
```### Import
```bash
import { Splide, SplideSlide } from 'splide-nextjs/react-splide';
```
```bash
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';
```