kr-ba-slider
v1.0.3
Published
A tiny before after slider
Downloads
13
Readme
Kreativrudel Before After Slider
Installation
NPM: npm install --save kr-ba-slider
Usage
HTML skeleton:
<div class="krba-slider">
<div class="krba-knob">
<img src="" alt="" />
</div>
<img class="krba-after-image" src="" alt="" />
<div>
<img class="krba-before-image" src="" alt="" />
</div>
</div>
JS (Webpack):
import KrBaSlider from '~@kreativrudel/kr-ba-slider.js';
let slider = document.getElementById('slider');
new KrBaSlider(slider);