hassandevtips/darktheme

DarkTheme - A simple Laravel package to enable dark mode using Bootstrap 5.

v0.0.2 2024-04-28 19:04 UTC

This package is auto-updated.

Last update: 2024-04-29 13:05:57 UTC


README

A Simple Package to add dark mode toggle feature to Bootstrap 5x

Screenshots

68747470733a2f2f692e736e6970626f6172642e696f2f35455965324c2e6a7067

Installation

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 Provider (Optional)

Add the provider to your config/app.php into provider section if using lower version of laravel,

Hassandevtips\DarkTheme\Providers\DarkThemeProvider::class,

Publish the Assets

Run the following command to publish config file,

php artisan vendor:publish --tag=dark-theme-assets

Configure Dark Mode On App

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

License

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

Buy Me A Coffee

Note

Dark Theme only works with Bootstrap 5x.