A theme library to help applications managing, loading and applying themes.
This library will create css variables for you.
This library will NOT create id's or classes for you.
npm i @pedro_s/theme.js
- Variables
- Transitions
- Animations
- Keyframes
Simple example of creating a theme
import ThemeJs from '@pedro_s/theme.js'
ThemeJs.CreateTheme("DarkMode", true)
ThemeJs.SetThemeValue("background", "#000")
ThemeJs.ApplyTheme()
Then to use a color all you have to do is add a var(--background)
or var(--rgb-background)
to your css or use it directly on your code using ThemeJs.CurrentTheme()["background"]
To build the library all you have to do is run the following commands
yarn
yarn build