Skip to main content

Interface: ThemeBundle

Defined in: Types.ts:784

A theme bundle packages a complete ThemeTokensV2 (the base) with an optional semantic-only override for the alternate color mode.

  • baseMode declares which mode the base theme represents.
  • alternate remaps only semantic token references that differ in the opposite mode. Core token values stay immutable.

When no alternate is provided, the theme is single-mode.

Example

const bundle: ThemeBundle = {
baseMode: 'light',
base: baseTheme,
alternate: {
semantic: {
colors: {
content: { primary: { background: { default: '{core.colors.neutral.900}' } } },
},
},
},
};

Properties

alternate?

optional alternate?: ModeOverride

Defined in: Types.ts:793

Semantic remapping overrides for the opposite mode. Only semantic references that differ need to be listed — core tokens are shared.


base

base: ThemeTokensV2

Defined in: Types.ts:788

Complete theme for the base mode.


baseMode

baseMode: "light" | "dark"

Defined in: Types.ts:786

Which color mode the base theme represents.