Skip to content
Entangle UI v0.13.0

createCustomTheme

createCustomTheme(selector, overrides): void

Defined in: src/theme/createCustomTheme.ts:34

Creates a custom theme scoped to a CSS selector by deep-merging overrides onto the dark theme defaults.

MUST be called in a .css.ts file (build-time only).

string

CSS selector to scope the theme to (e.g. ‘.my-brand’, ‘[data-theme=“light”]‘)

DeepPartial<ThemeValues>

Partial theme values to override

void

my-theme.css.ts
import { createCustomTheme } from 'entangle-ui/theme';
createCustomTheme('.my-brand', {
colors: {
accent: { primary: '#ff6600' },
},
});