θ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 theme provider context or
falls back to the application-wide theme set via configureTheme() .
Signature
θaddThemingController(host: ReactiveControllerHost & ReactiveElement, themes: ComponentThemes, config: ThemingControllerConfig): ThemingController Parameters
- host:
ReactiveControllerHost & ReactiveElementThe Lit element that will host the controller.
- themes:
ComponentThemesThe theme styles map containing
lightanddarkvariant entries, each keyed by theme name (bootstrap,material,fluent,indigo) and an optionalsharedentry applied regardless of theme. An entry is one style sheet, or an array of them in cascade order. - config:
ThemingControllerConfigOptional configuration.
Returns
ThemingController
The created ThemingController instance.