Skip to main content
Neural UIv2.0.0Documentation
View v1 GitHub

Project configuration

Optional global Core settings: types, defaults and when to use each option.

Configure only what you need

You do not need global Neural UI configuration to render a basic component. Use provideNeuralUI when the application needs shared regional formatting, an initial clock or a reusable token preset.

This example chooses a regional format. It is not mandatory and does not translate labels. Add the provider alongside existing router, HTTP or other providers rather than replacing them.

app.config.ts
import { ApplicationConfig } from '@angular/core';
import { provideNeuralUI } from '@neural-ui/core';

export const appConfig: ApplicationConfig = {
  providers: [provideNeuralUI({ locale: 'en-US' })],
};

Options and defaults

All options are optional. Omitting them preserves the defaults below. A preset registers token overrides; the application still chooses the light/dark mode. now is an advanced option for time-dependent initial state, not part of a basic Button example.

Option
Type
When omitted
Use it for
localestringAngular LOCALE_ID; en-US if unavailable.Regional formatting in components that consume the locale.
timeZonestringundefined: no global IANA zone override.Time formatting where the component supports it. It does not turn a civil date into an instant.
now() => DateA function returning new Date().A shared initial clock for time-dependent SSR or tests.
theme.presetNeuPresetDefinitionCore default tokens; no custom preset registered.A reusable light/dark token palette. The application still selects the mode.

Use a reusable preset

Define productPreset in product-preset.ts using the complete Themes recipe. Import it here and register it once. This does not enable hydration or register an icon resolver.

app.config.ts
import { ApplicationConfig } from '@angular/core';
import { provideNeuralUI } from '@neural-ui/core';
import { productPreset } from './product-preset';

export const appConfig: ApplicationConfig = {
  providers: [provideNeuralUI({ theme: { preset: productPreset } })],
};

Public Types

Inspect the definitions of types linked on this page.