Skip to main content
EpisBox ships with four built-in presets and a full token system for complete customization. Pass theme config to EPIS.init() — no CSS access to the iframe needed.

Preset themes

Start with a preset and override individual tokens on top:

Applying a preset

Overriding tokens on top of a preset

Individual tokens always win over the preset base:
Only the tokens you specify are overridden — everything else comes from the preset.

Building a custom theme from scratch

If none of the presets match, specify tokens directly. You only need to provide primary and mode — everything else can be derived:

Token derivation

When you omit optional tokens, the SDK derives them automatically:
Don’t want to compute all this by hand? Skip to AI theming skill below — describe your brand, get a ready-to-paste config.

AI theming skill

The EpisBox repo ships an AI agent skill graph at skills/customize/ that does everything on this page for you — no manual color math, no contrast-ratio checking by hand. Point any AI coding agent (Claude Code, Cursor, etc.) at theme-agent.md in that directory and describe your brand — colors, font, how rounded your UI is. The agent will:
  • Ask clarifying questions if anything’s ambiguous (e.g. missing secondary color, non-standard font)
  • Derive every token you didn’t specify (secondary, surface, textMuted, border, bubble colors) using the same rules as the token derivation table above
  • Verify WCAG AA contrast ratios and flag anything that would fail
  • Output a ready-to-paste theme object for EPIS.init(), with a short explanation of each derived value
It’s strictly scoped to the theme object — it won’t touch your auth flow, API calls, or component code. See constraints.md in the skill directory for the exact boundary, and examples/auraspace.md for a full worked session.

Syncing theme changes after init

If your own app has a light/dark toggle (or any other theme change) that fires after EPIS.init(), use EPIS.updateTheme() to push it to every mounted instance — no unmount/remount, no flicker, no lost conversation:
It accepts the same shape as config.theme, including preset — only the tokens you pass are changed, everything else from the current theme stays as-is. See the updateTheme() reference for full details.

System mode

Set mode: 'system' to automatically follow the user’s OS color scheme preference:
In 'system' mode, EPIS uses the dark token defaults when the OS is in dark mode and the light token defaults when in light mode. Your primary, font, and radius values apply in both.