Lightweight gallery.
https://luna.liriliri.io/?path=/story/gallery
Add the following script and style to your page.
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-carousel/luna-carousel.css" />
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-gallery/luna-gallery.css" />
<script src="//cdn.jsdelivr.net/npm/luna-carousel/luna-carousel.js"></script>
<script src="//cdn.jsdelivr.net/npm/luna-gallery/luna-gallery.js"></script>
You can also get it on npm.
npm install luna-gallery luna-carousel --save
import 'luna-carousel/luna-carousel.css'
import 'luna-gallery/luna-gallery.css'
import LunaGallery from 'luna-gallery'
const container = document.getElementById('container')
const gallery = new LunaGallery(container)
gallery.append('/pic1.jpg', 'pic1.jpg')
gallery.show()
Append image.
Insert image at given position.