Member Junction
    Preparing search index...

    Defines a theme available in the application. Built-in themes (light/dark) have no CssUrl. Custom themes specify a BaseTheme to inherit from and a CssUrl with overrides.

    interface ThemeDefinition {
        BaseTheme: "light" | "dark";
        CssUrl?: string;
        Description?: string;
        Id: string;
        IsBuiltIn: boolean;
        IsDefault?: boolean;
        Name: string;
        PreviewColors?: string[];
        Tokens?: Record<string, string>;
    }
    Index

    Properties

    BaseTheme: "light" | "dark"

    Which built-in theme this inherits from

    CssUrl?: string

    URL to the CSS file with token overrides (omit for built-in themes)

    Description?: string

    Optional description shown in theme picker

    Id: string

    Unique identifier (e.g. 'light', 'dark', 'izzy-dark')

    IsBuiltIn: boolean

    Whether this is a built-in theme (light/dark)

    IsDefault?: boolean

    The theme ThemeService.Initialize applies when the user has no saved preference (or the saved one is no longer registered). At most one registered theme should set it; the first registered wins. Without one the default stays 'system'. A single-brand host registers its brand as the default instead of calling SetTheme on every login, which fought Initialize()'s own resolution and wrote a preference the user never chose.

    Not the same axis as Theme Studio's org default (MJ: Themes.IsDefault): that one picks the org BRAND OVERLAY, registered via ThemeService.RegisterBrandTheme into the brand registry and layered under whatever base theme is active. This flag picks the BASE (picker) theme and never looks at the brand registry, so the two compose: a picker-only built-in default keeps the org overlay; a CssUrl default replaces it while selected, as any explicitly selected custom theme does.

    Name: string

    Human-readable display name (e.g. 'Light', 'Dark', 'Izzy Dark')

    PreviewColors?: string[]

    Optional preview swatch colors for a future theme picker UI

    Tokens?: Record<string, string>

    Derived --mj-* token overrides. Populated for brand themes emitted from seeds; an alternative/companion to CssUrl for token-based application and for feeding the Theme Builder preview without a round-trip through CSS.