https://github.com/stamat/slidescroll
A minimal ES6 module slider based on scrollIntoView
https://github.com/stamat/slidescroll
es6 esm iife javascript scroll slider slider-component slides
Last synced: about 2 months ago
JSON representation
A minimal ES6 module slider based on scrollIntoView
- Host: GitHub
- URL: https://github.com/stamat/slidescroll
- Owner: stamat
- License: mit
- Created: 2024-04-18T21:58:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-19T12:46:08.000Z (over 1 year ago)
- Last Synced: 2025-03-16T19:23:32.854Z (7 months ago)
- Topics: es6, esm, iife, javascript, scroll, slider, slider-component, slides
- Language: JavaScript
- Homepage: https://stamat.github.io/slidescroll
- Size: 85.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# slidescroll
[](https://www.npmjs.com/package/slidescroll)
[](https://github.com/stamat/slidescroll/blob/main/LICENSE)Minimal and performant scroll slider written in pure JavaScript. Responsiveness is native, no resize listener. Uses your elements, doesn't detach them or clone them. Provided as ESM and IIFE.
### Features
- No dependencies
- Small footprint
- ESM and IIFE
- Responsive (no resize listener)
- Uses your elements, doesn't detach them or clone them
- Custom next and prev buttons
- No CLS (Cumulative Layout Shift)### Demo
[https://stamat.github.io/slidescroll/](https://stamat.github.io/slidescroll/)
## Installation
### NPM
```bash
npm install slidescroll
```### Yarn
```bash
yarn add slidescroll
```Include the module in your project
```javascript
import Slidescroll from 'slidescroll'; // If you have node_modules resolution, if not than add the path to the module
```Include the SCSS file in your project or copy the styles from it, it's a very small CSS inside
```scss
@import 'slidescroll'; // If you have node_modules resolution, if not than add the path to the SCSS file
```### CDN
```html
```