ezitisitis/laravel-dark-theme-switcher

This is my package laravel-dark-theme-switcher

v1.1.0 2024-12-03 13:40 UTC

This package is auto-updated.

Last update: 2024-12-03 13:42:58 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.