PHPackages                             avalynx/avalynx-lightbox - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. avalynx/avalynx-lightbox

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

avalynx/avalynx-lightbox
========================

AvalynxLightbox is a simple, lightweight, and easy-to-use lightbox library. Based on Bootstrap &gt;=5.3 without any framework dependencies.

1.0.2(2mo ago)2331MITJavaScriptCI passing

Since Sep 20Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/avalynx/avalynx-lightbox)[ Packagist](https://packagist.org/packages/avalynx/avalynx-lightbox)[ Docs](https://github.com/avalynx/avalynx-lightbox)[ RSS](/packages/avalynx-avalynx-lightbox/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (1)

AvalynxLightbox
===============

[](#avalynxlightbox)

[![npm version](https://camo.githubusercontent.com/a52a0c60678be2018e319a471af0495e35c009d44dff2db5cae72341398624e7/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f6176616c796e782d6c69676874626f78)](https://www.npmjs.com/package/avalynx-lightbox)[![npm downloads](https://camo.githubusercontent.com/1d22f5e0605ff10c3b9dd878ccd735a46645142287e5efb1ec3e6ee86e3fc4f1/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f64742f6176616c796e782d6c69676874626f78)](https://www.npmjs.com/package/avalynx-lightbox)[![jsDelivr](https://camo.githubusercontent.com/f7798bf006a47586ecf0374a4c954ab801e9d385471f35c6be692e5a1ef99180/68747470733a2f2f696d672e736869656c64732e696f2f6a7364656c6976722f6e706d2f686d2f6176616c796e782d6c69676874626f78)](https://www.jsdelivr.com/package/npm/avalynx-lightbox)[![License](https://camo.githubusercontent.com/13ca39cdd3240cac01b7ec7b00786c385ad22d836cc211c8d9b7a4d616afdb15/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f6c2f6176616c796e782d6c69676874626f78)](LICENSE)[![Tests](https://github.com/avalynx/avalynx-lightbox/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/avalynx/avalynx-lightbox/actions/workflows/tests.yml)[![codecov](https://camo.githubusercontent.com/fde97cb5805191ac25b6adffa51d9ced34541cc53c6f63dec78079f4e4fae364/68747470733a2f2f636f6465636f762e696f2f67682f6176616c796e782f6176616c796e782d6c69676874626f782f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/avalynx/avalynx-lightbox)[![GitHub stars](https://camo.githubusercontent.com/2169d2e81f075b734d9e4591af6dc8d0ff5613207528e3d08509fa732cee2217/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6176616c796e782f6176616c796e782d6c69676874626f783f7374796c653d666c6174266c6f676f3d676974687562)](https://github.com/avalynx/avalynx-lightbox)

AvalynxLightbox is a simple, lightweight, and easy-to-use lightbox library, built on Bootstrap 5.3+ without any framework dependencies. It allows you to display images in a lightbox format with customizable options, perfect for integrating into modern web applications.

Features
--------

[](#features)

- **Bootstrap Integration**: Designed for seamless integration with Bootstrap &gt;= 5.3.
- **Customizable Options**: Configure lightbox behavior, including close functionality, opacity, z-index, and more.
- **Closeable Lightbox**: Optionally allow users to close the lightbox with a button or by clicking outside the image.
- **Callback Support**: Set custom actions when the lightbox is closed.
- **Lightweight**: No additional dependencies besides Bootstrap 5.3+.

Example
-------

[](#example)

Here's a simple example of how to use AvalynxLightbox in your project:

- [Overview](https://avalynx-lightbox.jbs-newmedia.de/examples/index.html)
- [Show lightbox](https://avalynx-lightbox.jbs-newmedia.de/examples/show-lightbox.html)

Installation
------------

[](#installation)

To use AvalynxLightbox in your project, you can directly include it in your HTML file. Ensure you have Bootstrap 5.3 or higher included in your project for AvalynxLightbox to work correctly.

First, include Bootstrap:

```

```

Then, include AvalynxLightbox:

```

```

Replace `path/to/avalynx-lightbox.js` with the actual path to the files in your project.

Installation via jsDelivr ([Link](https://cdn.jsdelivr.net/npm/avalynx-lightbox/))
----------------------------------------------------------------------------------

[](#installation-via-jsdelivr-link)

AvalynxLightbox is also available via [jsDelivr](https://www.jsdelivr.com/). You can include it in your project like this:

```

```

Make sure to also include Bootstrap's JS/CSS in your project to ensure AvalynxLightbox displays correctly.

Installation via NPM ([Link](https://www.npmjs.com/package/avalynx-lightbox))
-----------------------------------------------------------------------------

[](#installation-via-npm-link)

AvalynxLightbox is also available as a npm package. You can add it to your project with the following command:

```
npm install avalynx-lightbox
```

After installing, you can import AvalynxLightbox into your JavaScript file like this:

```
import { AvalynxLightbox } from 'avalynx-lightbox';
```

Make sure to also include Bootstrap's JS/CSS in your project to ensure AvalynxLightbox displays correctly.

Installation via Symfony AssetMapper
------------------------------------

[](#installation-via-symfony-assetmapper)

```
php bin/console importmap:require avalynx-lightbox
```

After installing, you can import AvalynxLightbox into your JavaScript file like this:

```
import { AvalynxLightbox } from 'avalynx-lightbox';
```

Make sure to also include Bootstrap's JS/CSS in your project to ensure AvalynxLightbox displays correctly.

Installation via Symfony AssetComposer
--------------------------------------

[](#installation-via-symfony-assetcomposer)

More information about the Symfony AssetComposer Bundle can be found [here](https://github.com/jbsnewmedia/asset-composer-bundle).

```
{% do addAssetComposer('avalynx/avalynx-lightbox/dist/js/avalynx-lightbox.js') %}
```

Make sure to also include Bootstrap's JS/CSS in your project to ensure AvalynxLightbox displays correctly.

Installation via Composer ([Link](https://packagist.org/packages/avalynx/avalynx-lightbox))
-------------------------------------------------------------------------------------------

[](#installation-via-composer-link)

AvalynxLightbox is also available as a Composer package. You can add it to your project with the following command:

```
composer require avalynx/avalynx-lightbox
```

After installing, you can import AvalynxLightbox into your HTML file like this:

```

```

Make sure to also include Bootstrap's JS/CSS in your project to ensure AvalynxLightbox displays correctly.

Usage
-----

[](#usage)

To create an alert, simply instantiate a new `AvalynxLightbox` object with the desired options:

```
new AvalynxLightbox('.avalynx-lightbox', {
    closeable: true,
    closeOnClickOutside: true,
    opacity: 80,
    zIndex: 1500,
    onClose: () => console.log('Lightbox closed')
}, {
    closeButtonLabel: 'Close'
});
```

Options
-------

[](#options)

AvalynxLightbox supports the following options for customization:

- `selector`: (string) CSS selector for the images to display in the lightbox (default: `'.avalynx-lightbox'`).
- `options`:
    - `closeable`: (boolean) Allow users to close the lightbox (default: `true`).
    - `closeOnClickOutside`: (boolean) Close the lightbox when the user clicks outside the image (default: `true`).
    - `onClose`: (function) A callback function to execute when the lightbox is closed (default: `null`).
    - `opacity`: (number) Background opacity (0-100) (default: `80`).
    - `zIndex`: (number) The z-index for the lightbox (default: `1500`).
- `language`:
    - `closeButtonLabel`: (string) The aria-label for the close button (default: `'Close'`).

Contributing
------------

[](#contributing)

Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request with your changes or improvements. We're looking for contributions in the following areas:

- Bug fixes
- Feature enhancements
- Documentation improvements

Before submitting your pull request, please ensure your changes are well-documented and follow the existing coding style of the project.

License
-------

[](#license)

AvalynxLightbox is open-sourced software licensed under the [MIT license](LICENSE).

Contact
-------

[](#contact)

If you have any questions, feature requests, or issues, please open an issue on our [GitHub repository](https://github.com/avalynx/avalynx-lightbox/issues) or submit a pull request.

Thank you for considering AvalynxLightbox for your project!

###  Health Score

40

—

FairBetter than 87% of packages

Maintenance91

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~104 days

Recently: every ~109 days

Total

6

Last Release

73d ago

Major Versions

0.0.4 → 1.0.02025-06-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/44b85e5ce069ccae08123600bb24204ea8fe99c8cb5cbfae108ff29c179e503d?d=identicon)[jschwind](/maintainers/jschwind)

---

Top Contributors

[![jschwind](https://avatars.githubusercontent.com/u/985564?v=4)](https://github.com/jschwind "jschwind (12 commits)")

---

Tags

avalynxbootstrapbootstrap5componentlightboxcomponentbootstraplightboxbootstrap5avalynx

### Embed Badge

![Health badge](/badges/avalynx-avalynx-lightbox/health.svg)

```
[![Health](https://phpackages.com/badges/avalynx-avalynx-lightbox/health.svg)](https://phpackages.com/packages/avalynx-avalynx-lightbox)
```

###  Alternatives

[datatables.net/datatables.net-bs5

DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table. This is DataTables with styling for \[Bootstrap5\](https://getbootstrap.com/)

2185.7k16](/packages/datatablesnet-datatablesnet-bs5)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
