luna-gallery
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

Luna Gallery

Lightweight gallery.

Demo

https://luna.liriliri.io/?path=/story/gallery

Install

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'

Usage

const container = document.getElementById('container')
const gallery = new LunaGallery(container)
gallery.append('/pic1.jpg', 'pic1.jpg')
gallery.show()

Api

append(src: string, title?: string): void

Append image.

insert(pos: number, src: string, title? string): void

Insert image at given position.

Readme

Keywords

Package Sidebar

Install

npm i luna-gallery

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

206 kB

Total Files

12

Last publish

Collaborators

  • surunzi