glightbox-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

GLightbox Plugin

Use this package to create custom plugins for GLightbox

How to use

npm install glightbox-plugin
import { GLightboxPlugin } from 'glightbox-plugin';

export default class CustomImageSlide extends GLightboxPlugin {
    name = 'video'; // Unique name for your plugin
    type = 'slide'; // can be slide or theme and so on
    options: ImageOptions;
    defaults: ImageOptions = {
        maxWidth: '100vw',
    };

    constructor(options: Partial<ImageOptions> = {}) {
        super();
        this.options = { ...this.defaults, ...options };
    }
}

Package Sidebar

Install

npm i glightbox-plugin

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

5.98 kB

Total Files

5

Last publish

Collaborators

  • biati