@tarbia/brand-core
v2.0.0
Published
Immutable Tarbia brand source-of-truth tokens and guards
Maintainers
Readme
@tarbia/brand-core
Immutable Tarbia brand source-of-truth — tokens, colors, and guards.
Zero React dependency. Install this when you need brand colors, spacing, or validation utilities in any JS/TS environment: Node scripts, non-React frontends, linters, or CI checks.
For full React component library, install @tarbia/ui instead.
Install
npm install @tarbia/brand-coreNo peer dependencies. Works in any JS/TS environment.
What's included
| Export | Contents |
|---|---|
| @tarbia/brand-core | All tokens and guards (index) |
| @tarbia/brand-core/tokens/colors | BRAND_COLORS, BRAND_COLOR_CSS_VARS |
| @tarbia/brand-core/tokens/spacing | BRAND_SPACING |
| @tarbia/brand-core/utils/brand-guards | validateColor, assertBrandColor |
| @tarbia/brand-core/globals.css | CSS custom properties for all brand tokens |
Usage
import { BRAND_COLORS, validateColor } from '@tarbia/brand-core'
// Use brand color values
const ink = BRAND_COLORS.ink.DEFAULT // '#2E2A24'
const amber = BRAND_COLORS.amber // '#C9973A'
// Validate a color in a design guard / CI script
if (!validateColor('#FF0000')) {
throw new Error('Off-brand color rejected')
}import { BRAND_COLORS } from '@tarbia/brand-core/tokens/colors'
import { BRAND_SPACING } from '@tarbia/brand-core/tokens/spacing'/* In your global stylesheet */
@import '@tarbia/brand-core/globals.css';Non-Negotiable Brand Rules
| Rule | Value |
|---|---|
| Color plates | Ink · Dust · Ivory · Amber only |
| Amber | #C9973A — hardcoded, never in a switching CSS var |
| Surface | Never #FFFFFF — use #F7F4EF (Ivory Light) |
| Shadows | Zero. Focus ring only: box-shadow: 0 0 0 3px #0891B2 |
| Borders | 0.5px solid always |
Relationship to @tarbia/ui
@tarbia/brand-core ← brand primitives only (this package)
↓
@tarbia/ui ← React components + theme + layoutInstall @tarbia/brand-core when you only need tokens.
Install @tarbia/ui when you need React components.
License
Apache-2.0 © Tarbia.io
