@monigo/tokens
v0.3.1
Published
Design tokens and theming helpers for Monigo UI packages.
Readme
@monigo/tokens
Design tokens and theming helpers for Monigo UI packages. Framework-agnostic.
Install
npm install @monigo/tokensUsage
Import the CSS once:
import '@monigo/tokens/monigo.css'
// optional:
import '@monigo/tokens/monigo-dark.css'Apply dark mode by setting an attribute on any ancestor element:
<section data-monigo-theme="dark">…</section>Generate a scoped theme CSS string at runtime (e.g. for per-tenant theming):
import { createTheme } from '@monigo/tokens'
const css = createTheme({ primary: '#6366f1', accent: '#f43f5e', mode: 'dark' })
document.head.appendChild(Object.assign(document.createElement('style'), { textContent: css }))See monigo.css for the full list of tokens.
