ezitisitis / laravel-dark-theme-switcher
This is my package laravel-dark-theme-switcher
Fund package maintenance!
ezitisitis
Buy Me A Coffee
Requires
- php: ^8.0
- illuminate/contracts: ^10.0||^11.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
README
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.
- In the
<head>
place next component:
<x-dark-theme-switcher::script/>
- Add switch component somewhere in the
<body>
:
<x-dark-theme-switcher::/>
- 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.