darktheme

1.1.3 • Public • Published

Get dark/light theme for your web projects

1. Installation

Goto terminal and install darktheme using command

npm i darktheme

Add class="darktheme" to our HTML file

<body class="darktheme">
    This is dark theme!

   
    <script src="./index.js"></script>
</body>

2. Usage

First import package in our JavaScript file (we can use require or import)

using require

const { darktheme } = require('darktheme');

or

using import

import { darktheme } from 'darktheme';

Then select a theme

[dark background and white text color]

darktheme({
   background_color: 'dark',
   color: 'light'
});

[light background and black text color]

darktheme({
   background_color: 'light',
   color: 'dark'
});

3. Run

we are going to use parcel

npm i parcel -g

parcel index.html

Package Sidebar

Install

npm i darktheme

Weekly Downloads

1

Version

1.1.3

License

ISC

Unpacked Size

2.09 kB

Total Files

3

Last publish

Collaborators

  • vansh__bhardwaj