@feather-scroll/plugins
v0.1.1
Published
Optional FeatherScroll plugins: lazyload, autoHeight, hash, thumbnails, autoScroll, mousewheel, scrollbar, virtual.
Readme
@feather-scroll/plugins
Optional, tree-shakeable plugins for FeatherScroll. Each is well under 1 KB gzipped — import only what you need.
| Plugin | What it does |
|---|---|
| lazyload | Load slide images only when near the viewport |
| autoHeight | Animate viewport height to the active slide |
| hash | Sync the active slide with the URL hash |
| thumbnails | Wire a thumbnail strip to the main carousel |
| autoScroll | Continuous marquee-style scrolling |
| mousewheel | Navigate with the mouse wheel |
| scrollbar | Draggable scrollbar |
| virtual | Virtualized rendering for long catalogs |
Install
npm i @feather-scroll/core @feather-scroll/pluginsUsage
import Carousel from '@feather-scroll/core';
import { lazyload, thumbnails } from '@feather-scroll/plugins';
new Carousel('#gallery', {
plugins: [lazyload(), thumbnails({ el: '#thumbs' })],
});