@keboola/brand-registry
v0.1.2
Published
Zod-validated brand token sets for per-customer theming
Downloads
430
Readme
@keboola/brand-registry
Zod-validated brand token sets for per-customer multi-brand theming in the Keboola platform.
Installation
npm install @keboola/brand-registry
# or
yarn add @keboola/brand-registryUsage
import { getBrand, keboola, brandSchema } from '@keboola/brand-registry';
// Use the built-in Keboola brand
console.log(keboola.colors.primary); // '#1F8FFF'
// Look up a brand by id
const brand = getBrand('keboola');
// Validate an arbitrary object against the schema
const parsed = brandSchema.parse(myBrandObject);Schema
type Brand = {
id: string; // lowercase alphanumeric + hyphens only
name: string;
colors: {
foreground: string;
background: string;
muted: string;
mutedForeground: string;
border: string;
primary: string;
primaryForeground: string;
destructive: string;
destructiveForeground: string;
};
typography?: { fontFamily: string };
radii?: { sm: string; md: string; lg: string };
};Architecture
See docs/branding.md for the full multi-brand
theming architecture.
