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:Building a custom theme from scratch
If none of the presets match, specify tokens directly. You only need to provideprimary and mode — everything else can be derived:
Token derivation
When you omit optional tokens, the SDK derives them automatically:AI theming skill
The EpisBox repo ships an AI agent skill graph atskills/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
themeobject forEPIS.init(), with a short explanation of each derived value
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 afterEPIS.init(), use EPIS.updateTheme() to push it to every mounted instance — no unmount/remount, no flicker, no lost conversation:
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
Setmode: '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.