PHPackages                             njxqlus/filament-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. njxqlus/filament-lightbox

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

njxqlus/filament-lightbox
=========================

Lightbox entry for Filament

5.0.0(7mo ago)2054.6k↑12.8%14[1 issues](https://github.com/njxqlus/filament-lightbox/issues)MITPHPPHP ^8.3CI passing

Since Sep 19Pushed 4mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (14)Versions (18)Used By (0)

Lightbox for Filament
=====================

[](#lightbox-for-filament)

[![Latest Version on Packagist](https://camo.githubusercontent.com/93d56b0e13cc988f565765e4f6c0898d8eefea5b4eb25e8c27da420b6437aabb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6a78716c75732f66696c616d656e742d6c69676874626f782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/njxqlus/filament-lightbox)[![GitHub Tests Action Status](https://camo.githubusercontent.com/74b33c27d70a29336de0e8b29b14a127e0844636b832901588a0a3fd8434ccf4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6e6a78716c75732f66696c616d656e742d6c69676874626f782f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/njxqlus/filament-lightbox/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/eb1595385e37c43d602aead119c736c795a3443b47b919d0458a804dff2f9647/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6a78716c75732f66696c616d656e742d6c69676874626f782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/njxqlus/filament-lightbox)

[![banner](https://github.com/njxqlus/filament-lightbox/raw/main/.github/banner.jpg?raw=true)](https://github.com/njxqlus/filament-lightbox/blob/main/.github/banner.jpg?raw=true)

Lightbox components for Filament. Supports Spatie Media Library.

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

[](#installation)

You can install the package via composer:

```
composer require njxqlus/filament-lightbox
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="filament-lightbox-views"
```

You can publish the config file to set up lightbox options with:

```
php artisan vendor:publish --tag="filament-lightbox-config"
```

Usage
-----

[](#usage)

### LightboxImageEntry

[](#lightboximageentry)

This entry extend default `ImageEntry` and wrap it to lightbox. To use it you need to pass an url to `href()` method.

```
use Njxqlus\Filament\Components\Infolists\LightboxImageEntry;

LightboxImageEntry::make('foo')
    ->href('https://biati-digital.github.io/glightbox/demo/img/large/gm2.jpg')
```

Also, you can pass an url to `image()` method that's accept a `Closure`.

```
use Njxqlus\Filament\Components\Infolists\LightboxImageEntry;

LightboxImageEntry::make('foo')
    ->image('https://biati-digital.github.io/glightbox/demo/img/small/gm2.jpg')
    ->href('https://biati-digital.github.io/glightbox/demo/img/large/gm2.jpg')
```

By default, all lightbox images on page are on the same gallery. It's mean that you can use arrow to move between them. If you want to divide galleries use a `slideGallery()` method.

```
use Njxqlus\Filament\Components\Infolists\LightboxImageEntry;

LightboxImageEntry::make('foo')
    ->href('https://biati-digital.github.io/glightbox/demo/img/large/gm2.jpg')
    ->slideGallery('qux-gallery')

LightboxImageEntry::make('bar')
    ->href('https://biati-digital.github.io/glightbox/demo/img/large/gm8.jpg')
    ->slideGallery('qux-gallery')

LightboxImageEntry::make('baz')
    ->href('https://biati-digital.github.io/glightbox/demo/img/large/gm9.jpg')
    ->slideGallery('fred-gallery'),
```

Because this entry extends [ImageEntry](https://filamentphp.com/docs/3.x/infolists/entries/image) all methods should be work (except of `url()`).

```
use Njxqlus\Filament\Components\Infolists\LightboxImageEntry;

LightboxImageEntry::make('foo')
    ->href('https://biati-digital.github.io/glightbox/demo/img/large/gm2.jpg')
    ->circular()
    ->label('Bar'),
```

### Lightbox Component

[](#lightbox-component)

This component allows you to pass any other entries to schema that's open lightbox.

```
use Njxqlus\Filament\Components\Infolists\Lightbox;

Lightbox::make()
    ->schema([
        TextEntry::make('foo')
    ])
    ->href('https://biati-digital.github.io/glightbox/demo/img/large/gm2.jpg')
```

### Lightbox Spatie Media Library Image Entry

[](#lightbox-spatie-media-library-image-entry)

This entry wrap [Filament Spatie Media Library Plugin](https://github.com/filamentphp/spatie-laravel-media-library-plugin) entry with lightbox

```
use Njxqlus\Filament\Components\Infolists\LightboxSpatieMediaLibraryImageEntry;

LightboxSpatieMediaLibraryImageEntry::make('foo')
    ->collection('images')
    ->conversion('thumb')
    ->circular()
    ->label('Bar')
```

### GLightBox

[](#glightbox)

This package uses [GLightBox](https://github.com/biati-digital/glightbox) under the hood. Most of its options provided as chain methods with `slide` prefix. There are some of them in the example below.

```
use Njxqlus\Filament\Components\Infolists\LightboxImageEntry;

LightboxImageEntry::make('foo')
    ->href('https://biati-digital.github.io/glightbox/demo/img/large/gm2.jpg')
    ->slideDescription(new HtmlString('Lightbox'))
    ->slideWidth('906px')
    ->slideHeight('500px')
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Mikael Ahabalyants](https://github.com/njxqlus)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance69

Regular maintenance activity

Popularity42

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 61.8% 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 ~49 days

Recently: every ~10 days

Total

16

Last Release

235d ago

Major Versions

1.0.0 → 2.0.02023-09-22

2.1.2 → 3.0.02024-03-11

3.4.1 → 4.0.02025-08-15

4.0.1 → 5.0.02025-09-26

PHP version history (3 changes)1.0.0PHP ^8.1

3.4.0PHP ^8.2

5.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/f120d68e714346845ffd1c7cdd4b4f06f70c065234bda4f15ce3d08b452919e8?d=identicon)[njxqlus](/maintainers/njxqlus)

---

Top Contributors

[![njxqlus](https://avatars.githubusercontent.com/u/15072672?v=4)](https://github.com/njxqlus "njxqlus (55 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (14 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (8 commits)")[![mucenica-bogdan](https://avatars.githubusercontent.com/u/846097?v=4)](https://github.com/mucenica-bogdan "mucenica-bogdan (4 commits)")[![Milad-Sarli](https://avatars.githubusercontent.com/u/150502402?v=4)](https://github.com/Milad-Sarli "Milad-Sarli (2 commits)")[![Arne1303](https://avatars.githubusercontent.com/u/25080047?v=4)](https://github.com/Arne1303 "Arne1303 (1 commits)")[![remzikocak](https://avatars.githubusercontent.com/u/1866678?v=4)](https://github.com/remzikocak "remzikocak (1 commits)")[![emargareten](https://avatars.githubusercontent.com/u/46111162?v=4)](https://github.com/emargareten "emargareten (1 commits)")[![jackwh](https://avatars.githubusercontent.com/u/627533?v=4)](https://github.com/jackwh "jackwh (1 commits)")[![josezenem](https://avatars.githubusercontent.com/u/377520?v=4)](https://github.com/josezenem "josezenem (1 commits)")[![notFloran](https://avatars.githubusercontent.com/u/523981?v=4)](https://github.com/notFloran "notFloran (1 commits)")

---

Tags

laravellightboxfilamentnjxqlusfilament-lightbox

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[pboivin/filament-peek

Full-screen page preview modal for Filament

253319.6k12](/packages/pboivin-filament-peek)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

58289.3k3](/packages/creagia-filament-code-field)[swisnl/filament-backgrounds

Beautiful backgrounds for Filament auth pages

54149.2k6](/packages/swisnl-filament-backgrounds)[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[tapp/filament-google-autocomplete-field

Filament plugin that provides a Google Autocomplete field

3098.1k](/packages/tapp-filament-google-autocomplete-field)

PHPackages © 2026

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