ezitisitis/laravel-dark-theme-switcher

This is my package laravel-dark-theme-switcher

Maintainers

Package info

github.com/ezitisitis/laravel-dark-theme-switcher

pkg:composer/ezitisitis/laravel-dark-theme-switcher

Fund package maintenance!

ezitisitis

Buy Me A Coffee

Statistics

Installs: 2 635

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 3

v1.2.0 2026-03-02 20:35 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package is made to provide good UX for theme switching and simplicity in implementation.

Support us

If you are using this package for commercial use, that would be highly appreciated to support through GitHub Sponsor program, as developing even small packages requires time and effort, while saving your precious time.

Installation

You can install the package via composer:

composer require ezitisitis/laravel-dark-theme-switcher

Include next components in your layout to add the switching script and switch itself.

  1. In the <head> place next component:
<x-dark-theme-switcher::script/>
  1. Add switch component somewhere in the <body>:
<x-dark-theme-switcher::/>
  1. Add next code to your app.js
import '../../vendor/ezitisitis/laravel-dark-theme-switcher/resources/js/themeSwitch.js';

Configuration

You can publish the config file with:

php artisan vendor:publish --tag=dark-theme-switcher-config

Optionally, you can publish the views using

php artisan vendor:publish --tag=dark-theme-switcher-views

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.