Angular
@theme-kit/angular
AngularDI7 exports
Angular providers, injectables and an element-scoped directive.
Installation
Install the integration alongside @theme-kit/core.
pnpm add @theme-kit/angularQuick Start
Complete copy-paste usage for this package.
1import { provideThemeKit } from "@theme-kit/angular";
2
3export const appConfig: ApplicationConfig = {
4 providers: [
5 provideThemeKit({
6 themes,
7 defaultTheme: "light",
8 }),
9 ],
10};More Examples
Additional patterns for Angular.
1import { injectTheme } from "@theme-kit/angular";
2
3@Component({ ... })
4export class AppComponent {
5 private theme = injectTheme();
6
7 toggle() {
8 this.theme().toggleTheme();
9 }
10}API Reference
Curated highlights below. The complete generated reference — every signature, parameter and type — is at /api-reference/angular.
Providers
| Export | Description |
|---|---|
provideThemeKit(options) | App provider that wires the runtime. |
provideThemeKitRuntime(runtime) | Share an existing runtime. |
Injectables
| Export | Description |
|---|---|
injectThemeRuntime() | Runtime injector. |
injectTheme() | Reactive ThemeState — theme, mode, family + setters. |
injectThemeHistory / injectThemeBatch | History and batching. |
injectThemeSnapshot / injectThemeRestore | Serialize / restore. |
Directives
| Export | Description |
|---|---|
ThemeScopeDirective | Element-scoped theming. |