2.0.0 • Published 5 months ago
darkthemewc v2.0.0
Dark Mode Toggle Web Component
A simple and practical web component to toggle between light and dark mode.
Features
- Toggles between light and dark mode.
- Saves user preference using local storage.
- Uses CSS variables for easy customization.
- Lightweight and beginner-friendly.
Installation
npm install dark-mode-toggle-component
Usage
Import the component in your project:
import 'dark-mode-toggle-component';
Then, use it in your HTML:
<dark-mode-toggle></dark-mode-toggle>
Customization
Modify CSS variables to customize appearance:
:root {
--toggle-bg: #ffffff;
--toggle-dark-bg: #333333;
--toggle-color: #000000;
--toggle-dark-color: #ffffff;
}
License
MIT
2.0.0
5 months ago