Vanilla JS/TS
Use @theemo/vite to load themes and @theemo/theme to manage themes.
Installation
sh
pnpm add -D @theemo/vite @theemo/themeConfiguration
Add @theemo/vite to load all themes
ts
import { defineConfig } from 'vite'
import { theemo } from '@theemo/vite';
export default defineConfig({
plugins: [
theemo({
defaultTheme: '<your-default-theme-name>'
})
]
});Usage
Instantiate ThemeManager to start switching themes and features.
ts
import { ThemeManager } from '@theemo/theme';
const manager = new ThemeManager();
manager.switchTheme('ocean');