@brunningfabio/neo-ds-tokens
v0.1.0
Published
Design tokens for Neo Design System — W3C DTCG format, multi-platform output
Readme
@brunningfabio/neo-ds-tokens
Design tokens for the Neo Design System — W3C DTCG format, multi-platform output.
Installation
npm install @brunningfabio/neo-ds-tokensUsage
CSS Custom Properties
@import '@brunningfabio/neo-ds-tokens/css';
.my-button {
background: var(--neo-button-primary-background);
color: var(--neo-button-primary-text);
}SCSS Variables
@import '@brunningfabio/neo-ds-tokens/scss';
.card {
background: $neo-card-background;
border: 1px solid $neo-card-border;
}Tailwind CSS
// tailwind.config.js
const neoTokens = require('@brunningfabio/neo-ds-tokens/tailwind');
module.exports = {
theme: {
extend: neoTokens,
},
};JSON
import tokens from '@brunningfabio/neo-ds-tokens/json';TypeScript Types
import type { NeoTokenName, NeoTokenMap } from '@brunningfabio/neo-ds-tokens/types';
const token: NeoTokenName = '--neo-brand-primary';Themes
The default theme is applied via :root. Additional themes use data-theme attributes:
<!-- Default theme (automatic) -->
<link rel="stylesheet" href="@brunningfabio/neo-ds-tokens/themes/default.css" />
<!-- Brand theme -->
<link rel="stylesheet" href="@brunningfabio/neo-ds-tokens/themes/looping.css" />
<body data-theme="looping">
<!-- All tokens now use the Looping brand colors -->
</body>Available Themes
| Theme | Description |
|-------|-------------|
| default | Neo Design System default palette |
| looping | Looping brand theme (purple primary) |
Token Architecture
Primitive Tokens → Semantic Tokens → Component Tokens
(colors, (brand, surface, (button, input,
spacing, status, border) card, badge,
typography) alert, modal)Build
npm run build # Generate all outputs
npm run clean # Remove dist/
npm test # Run testsLicense
MIT
