θaddThemingController

Creates and attaches a ThemingController to the given host element.

This is the preferred way to add theming support to a component. The controller is registered with the host's reactive controller lifecycle and automatically resolves the active theme from an ancestor <igc-theme-provider> context or falls back to the application-wide theme set via configureTheme() .

Signature

θaddThemingController(host: ReactiveControllerHost & ReactiveElement, themes: Themes, config: ThemingControllerConfig): ThemingController

Parameters

  • host: ReactiveControllerHost & ReactiveElement

    The Lit element that will host the controller.

  • themes: Themes

    The theme styles map containing light and dark variant entries, each keyed by theme name (bootstrap, material, fluent, indigo) and an optional shared entry applied regardless of theme.

  • config: ThemingControllerConfig

    Optional configuration.

Returns

ThemingController

The created ThemingController instance.