Skip to content

@absoluteui/angular

Application setup: provideAbsoluteUI and provideAbsoluteUIConfig, and the services for configuration, theme, locale, direction, icons, platform, and ids.

import { AuiConfig, AuiDirectionality, AuiIcons, AuiIds, AuiLocale, AuiPlatform, AuiTheme, provideAbsoluteUI, provideAbsoluteUIConfig } from '@absoluteui/angular';

Injectable service.

The configuration scope of the current injector. Inject it to read the effective settings (common()), or to change the scope at run time (set, patch).

Method Description
set(config: AbsoluteUIConfig): void Replace this scope’s own settings. Throws AbsoluteUIError on invalid values; the previous settings stay active.
patch(config: AbsoluteUIConfig): void Merge settings into this scope’s own settings.

Injectable service.

Text direction of the current configuration scope.

Injectable service.

Icon registry and provider (application-wide).

Method Description
register(icons: Readonly<Record<string, IconDefinition>>): void Add or replace named icons.
setProvider(provider: IconProvider | null): void Resolve icon names through an icon library adapter (null restores the registry).

Injectable service.

Unique element ids. Ids are generated in creation order, so server rendering and the client produce the same sequence for the same view tree.

Method Description
next(prefix?: string | undefined): string The next unique id, for example aui-3.

Injectable service.

Locale settings of the current configuration scope.

Injectable service.

Runtime capabilities. On the server, window is null and browser-only features report false.

Method Description
supports(feature: "ResizeObserver" | "IntersectionObserver" | "MutationObserver" | "matchMedia"): boolean Whether a browser API is available (always false on the server).

Injectable service.

Application theme, density, and animation mode (applied to the document element).

Method Description
setTheme(theme: string): void Switch the application theme (a built-in name or one registered with registerTheme).
setDensity(density: Density): void Switch the density (compact, comfortable, or spacious) for this configuration scope.
setAnimation(animation: AnimationMode): void Switch animations (‘subtle’ or ‘none’) for this configuration scope.

provideAbsoluteUI

Application setup: bootstrapApplication(App, { providers: [provideAbsoluteUI({ timezone: 'Asia/Kolkata', components: { dataTable: { pageSize: 50 } } })] }). Optional: without it, components use their defaults. In a lazy route’s providers it creates a nested scope like provideAbsoluteUIConfig.

function provideAbsoluteUI(options?: AbsoluteUIOptions): EnvironmentProviders;

provideAbsoluteUIConfig

A nested configuration scope for a route or component subtree: @Component({ providers: [provideAbsoluteUIConfig({ timezone: 'Europe/Berlin' })] }). Settings merge over the parent scope and apply to every AbsoluteUI component inside.

function provideAbsoluteUIConfig(config: AbsoluteUIConfig): Provider[];

AbsoluteUIOptions

Application options for provideAbsoluteUI.

interface AbsoluteUIOptions extends AbsoluteUIConfig {
icons?: IconProvider;
iconSet?: Readonly<Record<string, IconDefinition>>;
themeRuntime?: boolean | {
applyDirection?: boolean;
};
}

AbsoluteUIConfig

Configuration accepted by provideAbsoluteUI, provideAbsoluteUIConfig, and AuiConfig.set.

interface AbsoluteUIConfig extends Partial<CommonConfig> {
components?: ComponentConfigInput;
}