Genesis

Packages

@marktiderman/genesis-design-system

1.14.0Foundation · Coreessential

DTCG design tokens, brand schema, theme generators. Brand-agnostic; consumer brand packages satisfy the canonical schema.

Brand-agnostic design tokens for Genesis apps: the canonical brand schema, the factories that turn a brand into a Tailwind v4 preset or a NativeWind theme, design systems, the OKLCH colour engine, the font list, theme roles and the Genesis default brand.

A brand is identity: a name, colour scales, fonts and, optionally, a design system. `CanonicalBrand` is the shape; `validateBrand` checks one (the JSON Schema says the same).

pnpm add @marktiderman/genesis-design-system

READMEChangelognpm

@marktiderman/genesis-design-system
DTCG design tokens, brand schema, theme generators. Brand-agnostic; consumer brand packages satisfy the canonical schema.

Components (1)

  • GenesisThemeProvider

Hooks (2)

  • useOptionalTheme
  • useTheme

Other exports (128)

APP_BRAND_PAIRS · appBrandContrastProblems · appBrandCss · appBrandVariables · appStyleCss · appStyleVariables · arenaBrand · arenaStyle · borderRadius · brandContrastProblems · brandExtraVariables · brandGradientCss · brandRoleVariables · CHAT_ACCENTS · CHAT_ROLES · checklistBrand · checklistStyle · clampBounds · classicDesignSystem · COMPONENT_TOKENS · componentTokenCss · componentTokenProblem · composite · contrast · CORNER_RADII · CORNERS · crispDesignSystem · cubicBezierCss · debugBrandPreset · DEFAULT_DESIGN_SYSTEM_ID · DEFAULT_EYEBROW · DEFAULT_FONT_CLASS_RULES · DEFAULT_LEADING · DEFAULT_RAMP · defineAppBrand · defineAppStyle · defineDesignSystem · DENSITIES · DENSITY_LEVELS · DENSITY_LEVELS · designSystemTheme · fluid · FONT_CHOICES · FONT_CLASSES · FONT_IDS · fontFamily · fontFileKey · fontForStack · fontSize · fontWeight · generateDarkTheme · generateLightTheme · GENESIS_THEME_V2 · genesisBrand · genesisColors · genesisTheme · getComponentToken · getDesignSystem · getStarterBrand · getStarterStyle · getThemePart · GROUNDS · hexToHslTriplet · hexToOklch · IMAGE_FILTERS · isColorScale · journalBrand · journalStyle · LATIN_UNICODE_RANGE · listDesignSystems · maxChroma · MOTION_DURATIONS · MOTION_EASINGS · MOTION_LEVELS · MOTION_SPRINGS · motionCssVariables · neutral · NEUTRAL_DESIGN_SYSTEMS · NO_SHADOW · notebookBrand · notebookStyle · oklchToHex · palette · parsePartSelector · pressBrand · pressStyle · ramp · RAMP_STEPS · readGenesisThemeV2Flag · registerDesignSystem · relativeLuminance · renderAppStylesCss · repositoryBrand · repositoryStyle · resolveChatRoles · resolveChoices · resolveDensity · resolveDensity · resolveMotion · resolveThemeRoles · resolveTokens · rolePairs · SCRIMS · SELF_HOSTED_FONTS · semantic · SHADOW_LEVELS · softDesignSystem · spacing · STARTER_BRANDS · STARTER_STYLES · status · tailwindFromBrand · THEME_FONTS · THEME_PARTS · THEME_ROLES · THEME_ROLES · THEME_TOKEN_NAMES · themeFromBrand · themeToCss · trackerBrand · trackerStyle · TYPE_STEPS · unregisterDesignSystem · validateAppBrand · validateAppStyle · validateBrand · validateDesignSystem · validateDesignSystemChoice

And 86 types.

@marktiderman/genesis-design-system/tokens

Other exports (24)

borderRadius · CHAT_ACCENTS · CHAT_ROLES · cubicBezierCss · fontFamily · fontSize · fontWeight · generateDarkTheme · generateLightTheme · MOTION_DURATIONS · MOTION_EASINGS · MOTION_SPRINGS · motionCssVariables · nativeThemeDark · nativeThemeLight · neutral · resolveChatRoles · resolveMotion · resolveThemeRoles · semantic · spacing · status · THEME_ROLES · themeToCss

And 15 types.

@marktiderman/genesis-design-system/tokens/native

Other exports (8)

nativeColors · nativeFontFamily · nativeFontSize · nativeFontWeight · nativeLineHeight · nativeRadius · nativeSpacing · nativeTypography

@marktiderman/genesis-design-system/tokens/motion

Other exports (6)

cubicBezierCss · MOTION_DURATIONS · MOTION_EASINGS · MOTION_SPRINGS · motionCssVariables · resolveMotion

And 7 types.

@marktiderman/genesis-design-system/providers/native

Components (1)

  • GenesisThemeProvider

Hooks (1)

  • useGenesisTheme

Other exports (2)

GENESIS_PRIMARY · GENESIS_PRIMARY_DARK

And 4 types.

@marktiderman/genesis-design-system/schema/brand

Other exports (4)

clampBounds · isColorScale · isLength · validateBrand

And 13 types.

@marktiderman/genesis-design-system/design-systems

Other exports (39)

classicDesignSystem · composite · contrast · CORNER_RADII · CORNERS · crispDesignSystem · DEFAULT_DESIGN_SYSTEM_ID · DEFAULT_EYEBROW · DEFAULT_FONT_CLASS_RULES · DEFAULT_LEADING · DEFAULT_RAMP · defineDesignSystem · DENSITIES · designSystemTheme · fluid · getDesignSystem · GROUNDS · hexToHslTriplet · hexToOklch · IMAGE_FILTERS · listDesignSystems · maxChroma · MOTION_LEVELS · NEUTRAL_DESIGN_SYSTEMS · oklchToHex · palette · ramp · RAMP_STEPS · registerDesignSystem · relativeLuminance · resolveChoices · rolePairs · SCRIMS · SHADOW_LEVELS · softDesignSystem · TYPE_STEPS · unregisterDesignSystem · validateDesignSystem · validateDesignSystemChoice

And 24 types.

@marktiderman/genesis-design-system/app-styles

Other exports (42)

APP_BRAND_PAIRS · appBrandContrastProblems · appBrandCss · appBrandVariables · appStyleCss · appStyleVariables · arenaBrand · arenaStyle · checklistBrand · checklistStyle · COMPONENT_TOKENS · componentTokenCss · componentTokenProblem · defineAppBrand · defineAppStyle · DENSITY_LEVELS · getComponentToken · getStarterBrand · getStarterStyle · getThemePart · journalBrand · journalStyle · NO_SHADOW · notebookBrand · notebookStyle · parsePartSelector · pressBrand · pressStyle · renderAppStylesCss · repositoryBrand · repositoryStyle · resolveDensity · STARTER_BRANDS · STARTER_STYLES · THEME_FONTS · THEME_PARTS · THEME_ROLES · THEME_TOKEN_NAMES · trackerBrand · trackerStyle · validateAppBrand · validateAppStyle

And 17 types.

@marktiderman/genesis-design-system/fonts

Other exports (7)

FONT_CHOICES · FONT_CLASSES · FONT_IDS · fontFileKey · fontForStack · LATIN_UNICODE_RANGE · SELF_HOSTED_FONTS

And 4 types.

@marktiderman/genesis-design-system/theme

Components (1)

  • GenesisThemeProviderBeta

    The person's **appearance**: light, dark or system (the glossary's word; the props keep their older `mode` names). It is the person's choice, never an app brand's, style's or theme's: pass it controlled from where the person's choice is ...

Hooks (2)

  • useOptionalTheme

    Read the active theme from the nearest `<GenesisThemeProvider>`.

  • useTheme

    The theme, or throws outside a `<GenesisThemeProvider>`. A primitive that should still render without one uses {@link useOptionalTheme}.

Other exports (3)

GENESIS_THEME_V2 · readGenesisThemeV2Flag · resolveTokens

And 7 types.