PHPackages                             awcodes/dimmer - 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. [Templating &amp; Views](/categories/templating)
4. /
5. awcodes/dimmer

ActiveLibrary[Templating &amp; Views](/categories/templating)

awcodes/dimmer
==============

Dimmer is a simple package to easily add a light/dark/system mode switcher to your Laravel app.

v1.2.0(1y ago)459MITBladePHP ^8.1CI passing

Since Jan 9Pushed 1mo ago1 watchersCompare

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

READMEChangelog (3)Dependencies (8)Versions (5)Used By (0)

Dimmer
======

[](#dimmer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/db68904c25256b354a09ad288333b3c3b3c84d4189abac4e97987d8b56e730cc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6177636f6465732f64696d6d65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/awcodes/dimmer)[![Total Downloads](https://camo.githubusercontent.com/7937abaa3c01198137a66d5aea8836137edb542a01e183366bed741066abcc83/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6177636f6465732f64696d6d65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/awcodes/dimmer)

[![dimmer](https://private-user-images.githubusercontent.com/3596800/295265155-88aeda63-7ad3-448c-b6d5-526c5620747f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUxMDk5OTM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duYXR1cmU9OTlhODUxMDIzNzVmMGM4ZmUzNjY5NjVmNWIzYWM3N2NiZGIxNjM2ZDYxYTBhYzgwM2RhMDM0ODFiMGQ5N2MwYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.ltul9PsD1ev-Sd0d07ro4zyHXchIFkPbggebKP-EoMU)

Dimmer is a simple package to easily add a light/dark/system mode switcher to your Laravel app.

Requirements
------------

[](#requirements)

- Alpine JS
- Tailwind CSS

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

[](#installation)

You can install the package via composer:

```
composer require awcodes/dimmer
```

Next, you need to add the views to your `tailwind.config.js` file:

```
content: [
    './vendor/awcodes/dimmer/resources/views/**/*.blade.php',
]
```

Optionally (not recommended), you can publish the views using

```
php artisan vendor:publish --tag="dimmer-views"
```

You can also update the translations by publishing the lang files:

```
php artisan vendor:publish --tag="dimmer-translations"
```

Usage
-----

[](#usage)

Just include the `dimmer` component in your layout or anywhere you would to use it.

```

```

### Forcing a default mode

[](#forcing-a-default-mode)

Should you wish to force a default mode for when a user first visits the site, you can do so by setting the `force-mode` attribute on the `dimmer` component. Without this attribute set, the default mode will be determined by the user's system preferences.

```

```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Adam Weston](https://github.com/awcodes)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance70

Regular maintenance activity

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~208 days

Total

3

Last Release

445d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3596800?v=4)[Adam Weston](/maintainers/awcodes)[@awcodes](https://github.com/awcodes)

---

Top Contributors

[![awcodes](https://avatars.githubusercontent.com/u/3596800?v=4)](https://github.com/awcodes "awcodes (17 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)")

---

Tags

bladelaravellaravel-packagelaravelawcodesdimmer

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/awcodes-dimmer/health.svg)

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

###  Alternatives

[ryangjchandler/blade-capture-directive

Create inline partials in your Blade templates with ease.

8222.2M12](/packages/ryangjchandler-blade-capture-directive)[spatie/laravel-blade-comments

Add debug comments to your rendered output

177325.5k](/packages/spatie-laravel-blade-comments)[daikazu/laravel-glider

Start using Glide on-the-fly instantly in your Laravel blade templates.

882.3k](/packages/daikazu-laravel-glider)[combindma/dash-ui

A streamlined and stylish UI component library for Laravel Blade, crafted with TailwindCSS and AlpineJs for simplicity and elegance.

631.4k](/packages/combindma-dash-ui)[solution-forest/filament-field-group

Filament Field Group is a powerful Laravel package that enhances Filament's form building capabilities. It allows you to easily group and organize form fields, improving the structure and readability of your forms.

291.8k3](/packages/solution-forest-filament-field-group)

PHPackages © 2026

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