astro-lightgallery
v2.0.1
Published
Astro component for lightgallery, JavaScript gallery for building beautiful image and video galleries and carousel (including thumbnail) for the web and the mobile
Maintainers
Readme
Installation
Get the latest version from NPM:
$ npm install astro-lightgalleryLicense
Astro-lightGallery is released under the MIT license.
Astro-lightGallery is using lightGallery. lightGallery is a free and open-source library, however, if you are using the library for business, commercial sites, projects, and applications, choose the commercial license to keep your source proprietary, to yourself. Please refer to the lightGallery license page
Usage
Here is a simple example that is using the default layout (adaptive). Layout can be customized, by defining your own classes definition (as for example adding effects on hover)
---
import { LightGallery } from 'astro-lightgallery'
---
<LightGallery
layout={{
imgs: [
{ src: "/img01.jpg", },
{ src: "/img02.jpg", },
...
]
}}
options={{
thumbnail: true,
}}
/>Complex Examples
Layout can be customized. But we may also want to use astro-lightgallery without layouts, and use native lightgallery scheme.
Please check the online doc for a fullset of examples, including navigation and thumbnails.
Full code is provided.
