Skip to content

createCustomTheme

createCustomTheme(selector, overrides): void

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

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).

Parameters

selector

string

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

overrides

DeepPartial<ThemeValues>

Partial theme values to override

Returns

void

Example

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