astro-lightgallery

2.0.0 • Public • Published
     

Astro LightGallery

Astro LightGallery is the native Astro component for lightGallery. lightGallery is a feature-rich, modular JavaScript gallery plugin for building beautiful image and video galleries for the web and the mobile

It includes some layouts to ease integration of lightgallery.

Demo



Installation

Get the latest version from NPM:

$ npm install astro-lightgallery

License

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.

/astro-lightgallery/

    Package Sidebar

    Install

    npm i astro-lightgallery

    Weekly Downloads

    440

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    17.3 kB

    Total Files

    7

    Last publish

    Collaborators

    • pascal-brand38