1.0.0 • Published 3 years ago
guaiamum-dmt-ka-slider v1.0.0
Image Caroussel Slider
Using scrollBy API this component receives the following props:
- images: Required. Set of image
src
andalt
to be rendenred. Should come in the format:{src:'path/to/image', desc:'Image's alt text'}
- width = 300. Image width, to avoid CLS.
- height = 150. Image height, to avoid CLS.
- loadFirst = 1. number of images that should not be lazyloaded. Any image beyond this number is going to use the IntersectionObserver API to be lazy loaded. Unfortunately loading lazy is not mature enough to support horizontal scrolling.
This component also uses scroll snapping so on mobile there's no need to use the prev/next buttons.
Package is provided not bundled, use your own bundling solution :)
Known Issues
- Observer script not tested
- No RTL support on desktop
1.0.0
3 years ago