Core design system for the Kreoza platform. This package provides synchronized design tokens for TypeScript, CSS, and Tailwind CSS (v3 and v4).
Tailwind v4 is CSS-first. Simply import the styles in your main CSS file:
@import "tailwindcss";
@import "@kreozalabs/styles";This automatically registers all theme variables (e.g., bg-primary, text-h1).
Programmatic access to all raw hex values and design constants:
import { tokens } from '@kreozalabs/styles';
const primaryColor = tokens.colors.light.primary;Add the preset to your tailwind.config.js:
module.exports = {
presets: [require('@kreozalabs/styles/tailwind-preset')],
content: ["./src/**/*.{ts,tsx}"],
}This package uses tokens.ts as the Single Source of Truth. Do not edit tokens.css or base.css variables manually.
- Open
tokens.ts. - Update the values (colors, fonts, etc.).
- Run
pnpm build. This will regeneratetokens.cssand thedist/files.
If you add a new category to tokens.ts (e.g., spacing or shadows):
- Update
tokens.tswith the new data. - Update
scripts/sync-tokens.tsto include the logic for mapping these new tokens to CSS variables and the Tailwind@themeblock. - Run
pnpm build.
pnpm build: Cleans, synchronizes tokens, and transpiles.pnpm clean: Removes all generated files (dist/,tokens.css).pnpm build:tokens: Only runs the synchronization script.pnpm pack: Creates a.tgzfor local testing.
- Primary Font:
PT Sans(legible, professional sans-serif). - Modular Scale: Uses a 1.414 ratio (Augmented Fourth) to ensure harmonious typography sizing across all headings.
- Color System: Tokens are centralized in
tokens.tsto ensure consistent saturation and contrast across Light and Dark themes. - License: BSD-3-Clause