xthemes
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

xThemes

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)

Usage

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

File with Colors:

import { themeSet } from 'xthemes'

export const colors = themeSet({
    primaryColor: {
        default: '#000',
        <custom_theme>: '#fff',
    },
    primaryBackground: {
        default: '#fff',
        <custom_theme>: '#000',
    }
})

Usage in CSS:

color: var(--primaryColor),
background: var(--primaryBackground)

Readme

Keywords

none

Package Sidebar

Install

npm i xthemes

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

4.61 kB

Total Files

4

Last publish

Collaborators

  • notrealandy