A Simple Package to add dark mode toggle feature to Bootstrap 5x
Install the package by the following command, (try with --dev
if you want to not install it on production environment)
composer require hassandevtips/darktheme
Add the provider to your config/app.php
into provider
section if using lower version of laravel,
Hassandevtips\DarkTheme\Providers\DarkThemeProvider::class,
Run the following command to publish config file,
php artisan vendor:publish --tag=dark-theme-assets
Add following code in root blade file in header section.
<!-- Dark Mode Toggle -->
<x-darktheme::dark-mode-toggle />
Or Can Also Add A Blade Directive
<!-- Dark Mode Toggle -->
@darkmodetoggle
The MIT License (MIT). Please see License File for more information
Dark Theme only works with Bootstrap 5x.