Email Theme

Foundation

Resolves shadcn HSL design tokens into email-safe concrete hex values. Generates Tailwind config for React Email with pixelBasedPreset-compatible settings. The bridge between your shadcn theme and email rendering.

core/email-theme

Installation

1 · Add registry to components.json

2 · Install component

Examples

Resolved tokens

The default Keystone Core email theme: HSL tokens resolved to hex, with typography and border-radius.

API Reference

PropTypeDescription
EmailThemeTokens
interfaceFully resolved token set: all colors as #rrggbb, font stacks, border radii as px strings.
hslToHex(hsl)
string → stringConverts "220 14% 94%" to "#eeeff1".
resolveEmailTheme(hslTokens, overrides?)
EmailThemeTokensResolves HSL record into concrete tokens, with optional overrides.
createEmailTailwindConfig(theme)
EmailTailwindConfigGenerates Tailwind config with colors, fonts, and radii from resolved tokens.
KC_DEFAULT_HSL_TOKENS
Record<string, string>Keystone Core light-mode HSL tokens from globals.css.