https://github.com/onyx-nxt/dark-mode
A pure html and css library for dark mode in your website.
https://github.com/onyx-nxt/dark-mode
css dark dark-mode dark-theme html html5
Last synced: about 1 month ago
JSON representation
A pure html and css library for dark mode in your website.
- Host: GitHub
- URL: https://github.com/onyx-nxt/dark-mode
- Owner: onyx-nxt
- License: mit
- Created: 2021-06-15T22:56:07.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-07-16T08:28:00.000Z (almost 3 years ago)
- Last Synced: 2025-02-18T02:39:34.249Z (over 1 year ago)
- Topics: css, dark, dark-mode, dark-theme, html, html5
- Language: CSS
- Homepage:
- Size: 38.1 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dark Mode
A pure html and css library for dark mode in your website.
---
# Features
It has a smooth setting and also it changes via system settings aswell. Small, but useful.
---
# Usage
To use this library follow the steps below:
First, import the css with the following:
```html
```
Then you need the javascript with can be done similar to the css:
```html
```
Once your done with the imports your code looks something like this:
```html
```
Now its time to add the last element; The button.
Add it in the body as the following:
```html
Toggle dark mode
```
And boom your done! See options and more below.
---
# Settings
Want to customize it? We'll we have some options for you. More options coming in the feature.
The only option we have right now is smooth change. It makes a trasistion so it doesn't look so abrupt. See the code below have to to get this:
```html
Toggle dark mode
```
---
# Demo
Use this demo to see how it works. \
\
[DEMO](https://jsfiddle.net/NotBacon/8huy1sgk/ "Demo")
---
### Thanks for using this library!
---
[](#readme)