Angular
@themvora/angular
AngularDI7 exports
Angular providers, injectables and an element-scoped directive.
Verified with Themvora 2.0.0·Updated 2026-09-17
Prerequisites
Package Manager
npm, pnpm, yarn, or bun
Dependencies
@themvora/core (peer dependency)
Use Case
Angular projects with theme support
Installation
Install the integration — @themvora/core is pulled in automatically as a dependency.
pnpm add @themvora/angularQuick Start
Complete copy-paste usage for this package.
import { provideTheme } from "@themvora/angular";
export const appConfig: ApplicationConfig = {
providers: [
provideTheme({
defaultTheme: "light",
}),
],
};More Examples
Additional patterns for Angular.
import { injectTheme } from "@themvora/angular";
@Component({ ... })
export class AppComponent {
private theme = injectTheme();
toggle() {
this.theme().toggleTheme();
}
}API Reference
Curated highlights below. The complete generated reference — every signature, parameter and type — is at /api-reference/angular.
Providers
| Export | Description |
|---|---|
provideTheme(options) | App provider that wires the runtime. |
provideThemeRuntime(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. |