@framingui/tokens
v0.3.5
Published
TypeScript token type definitions with compile-time enforcement
Maintainers
Readme
@framingui/tokens
TypeScript token type definitions with compile-time enforcement
Installation
npm install @framingui/tokensUsage
import type { FramingUITokens, TokenReference } from '@framingui/tokens';
// TokenReference ensures only CSS variables are allowed
const background: TokenReference = 'var(--framingui-bg-surface-default)';
// TypeScript error: Type '"#ffffff"' is not assignable to type 'TokenReference'
// const invalid: TokenReference = '#ffffff';Token Categories
- BgTokens: Background colors
- FgTokens: Foreground/text colors
- SpacingTokens: Spacing scale
- RadiusTokens: Border radius
- TypographyTokens: Font properties
- ShadowTokens: Box shadows
License
MIT
