xThemes is module made in Vanilla JavaScript
without any other modules for fast operations.
Note: default theme is always default
and can't be changed yet.
Note (Usage): Always execute the code in the main code file. (for react it's the main file where the content renders | main.tsx)
import { setTheme } from 'xthemes' // import xThemes setTheme function
import { colors } from './vars.ts' // import your file with colors
colors // execute colors
setTheme("<theme_name>") // set for your theme | leave empty for default
import { themeSet } from 'xthemes'
export const colors = themeSet({
primaryColor: {
default: '#000',
<custom_theme>: '#fff',
},
primaryBackground: {
default: '#fff',
<custom_theme>: '#000',
}
})
color: var(--primaryColor),
background: var(--primaryBackground)