A simple lightbox solution in vanilla JS.
Install the package
npm install https://github.com/Nefla/avalonbox
Get the CSS file from dist OR from the github CDN OR
Since the component was developed using Sass you could integrate with your code in case you are using Sass.
import avalonbox from 'avalonbox'
avalonbox.run('image-gallery')
HTML sample code:
<div id="image-gallery" class="gallery">
<a href="images/image_1.jpg">
<img src="images/thumb_image_1.jpg" />
</a>
<a href="images/image_2.jpg">
<img src="images/thumb_image_2.jpg" />
</a>
<a href="images/image_3.jpg">
<img src="images/thumb_image_3.jpg" />
</a>
</div>
Clone the repository and move to the directory:
git clone https://github.com/Nefla/avalonbox.git
cd avalonbox
Install the dependencies and run build:
npm install
npm build
Finally, run npm start:
npm start
(CC BY 3.0 US) Navigation icons
MIT.