Pure JS lightbox component for Vue.js.Very simple lightbox plugin without any dependencies - only Vue!
npm i vue-pure-lightbox --save
<!-- In <head> -->
<meta rel="stylesheet" href="https://unpkg.com/vue-pure-lightbox/dist/vue-pure-lightbox.css">
<!-- In <body>, after Vue import -->
<script src="https://unpkg.com/vue-pure-lightbox/dist/vue-pure-lightbox.js"></script>
In your index file
import Lightbox from 'vue-pure-lightbox'
Vue.use(Lightbox)
<script>
Vue.use(Lightbox)
new Vue({
// ...
})
</script>
Then in any of your components
<lightbox
thumbnail="/path/to/thumbnail.jpg"
:images="['/path/to/image1.jpg', '/path/to/image1.jpg']"
></lightbox>
Dariusz Czajkowski
Author: DCzajkowski
Live Demo: https://codepen.io/DCzajkowski/pen/rzOErW
GitHub: https://github.com/DCzajkowski/vue-pure-lightbox
#vuejs #javascript #vue-js