@pcoi/tokens
v2.0.0
Published
PCOI Design System — design tokens (CSS custom properties + text-style utility classes).
Readme
@pcoi/tokens
Design tokens for the PCOI Design System: CSS custom properties, text-style utility classes, and the Inter / JetBrains Mono variable fonts. The CSS is hand-authored and audited against the PCOI Figma file — it is the design contract, not a codegen artifact.
Install
npm install @pcoi/tokensUsage
Import once at your application entry:
import "@pcoi/tokens";This loads three stylesheets:
fonts.css— Inter Variable and JetBrains Mono Variable (via the bundled@fontsource-variablepackages)tokens.css— every--*custom property (colors, spacing, radii, shadows, motion), themed viadata-themetypography.css—.type-*text-style utility classes
Global resets and base page styles are opt-in (they mutate global styles, so they're not loaded by default):
import "@pcoi/tokens/global.css";Granular imports
Each stylesheet is also exported on its own subpath if you want a subset (for example, skipping the bundled fonts to self-host):
import "@pcoi/tokens/tokens.css";
import "@pcoi/tokens/typography.css";
import "@pcoi/tokens/fonts.css";
import "@pcoi/tokens/global.css";Theming
Tokens resolve per theme through the data-theme attribute on a root element. PCOI is dark-first:
<html data-theme="dark">Set data-theme="light" for the light mode values.
Requirements
- A bundler that handles CSS imports (Vite, Next.js, webpack with css-loader, etc.). The JS entry point is side-effect CSS imports only, so it cannot be imported in a plain Node/SSR context without CSS handling — use the
*.csssubpaths directly in that case. fonts.cssuses bare@import "@fontsource-variable/..."specifiers, resolved by your bundler through this package's dependencies. If you self-host fonts, skipfonts.cssand load your own@font-facerules.
License
MIT
