Looking to hire Laravel developers? Try LaraJobs

laravel-dark-theme-switcher maintained by ezitisitis

Description
This is my package laravel-dark-theme-switcher
Last update
2026/04/20 21:12 (dev-dependabot/github_actions/dependabot/fetch-metadata-3.1.0)
License
Downloads
2 929

Comments
comments powered by Disqus

Dark Theme Switcher for Laravel

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.