The model is number | null, never formatted text. formatOptions controls locale, decimal digits and optional currency. min/max bound accepted values; step controls the steppers. inputDetail distinguishes valid, incomplete and invalid editing text without replacing the committed model.
Change the controls and try the live preview. Expand the application value or event to inspect its real data; the generated template stays with the configurator.
These values match the current preview. Complete handlers, Core imports and templates are in Source.
configured-state.ts
import { signal } from '@angular/core';
export const number = signal(25);
export const formatOptions = {
"locale": "en-US",
"style": "decimal",
"maximumFractionDigits": 2
};
These inputs require a model or function, not a checkbox. Edit the same-named field in the Source component and bind it in the template; data already used by this preview appears in the state above.
Bind FormField once to the component; the field owns value and validation. The schema requires a non-empty value. Leave the control to mark it touched, then reset the field to clear both value and interaction state.
Use [(value)] or [value] with (valueChange), not both. The model synchronizes application state; other Outputs communicate their documented events. touch reports leaving/visiting the control, not a new value.
Associate label with the number field. Name both stepper buttons with incrementLabel/decrementLabel. ArrowUp/ArrowDown changes step; Home/End uses configured bounds. Explain invalid or incomplete text with a message rather than color alone.
Inputs, models and Outputs come from the pinned Core contract. Click named types to open their definitions. This component has no public template slots.
Inputs
Configure the component with [property]="value". Your application supplies these values; the component does not replace the state you pass in.
Name
Type
Default
Template binding
Description
ariaDescribedBy
string
''
[ariaDescribedBy]
IDs of elements describing the control, separated by spaces.
ariaLabel
string
''
[ariaLabel]
Accessible name when no visible label is available.
ariaLabelledBy
string
''
[ariaLabelledBy]
IDs of elements naming the native number input, separated by spaces.
decrementLabel
string
'Decrease'
[decrementLabel]
Accessible name of the decrease button.
dirty
boolean
false
[dirty]
Form state indicating that the user has changed the value.
disabled
boolean
false
[disabled]
Prevents user interaction.
errors
readonly ValidationError.WithOptionalFieldTree[]
[]
[errors]
Validation errors supplied by the form or the application.
floatingLabel
boolean
false
[floatingLabel]
Displays the label in the floating-label field style.
Editing detail: rawText, parsing state and committed numeric value. Does not replace valueChange.
touch
void
(touch)="onTouch($event)"
Notifies the form that the control has been touched; not a value change.
Templates
ng-content projects content into the component. TemplateRef inputs receive a template; ng-template directives identify templates with a typed context. A directive shared by an entrypoint is not necessarily a slot of this component.
This component does not expose content projection or public customization templates.
Public Types
Open a type to inspect its definition and interface fields.
NeuNumberInputDetail.d.ts
import type { NeuNumberInputState } from '@neural-ui/core/number-input';
import type { NeuNumberInputDetail } from '@neural-ui/core/number-input';
// Public declaration (reference only)
export interface NeuNumberInputDetail {
readonly rawText: string;
readonly state: NeuNumberInputState;
readonly value: number | null;
}
NeuNumberInputFormatOptions.d.ts
import type { NeuNumberInputFormatOptions } from '@neural-ui/core/number-input';
// Public declaration (reference only)
export type NeuNumberInputFormatOptions = (NeuNumberInputFormatBase & {
readonly style?: 'decimal';
readonly currency?: never;
}) | (NeuNumberInputFormatBase & {
readonly style: 'currency';
readonly currency: string;
});
NeuNumberInputLayout.d.ts
import type { NeuNumberInputLayout } from '@neural-ui/core/number-input';
// Public declaration (reference only)
export type NeuNumberInputLayout = 'horizontal' | 'stacked' | 'vertical';
NeuNumberInputState.d.ts
import type { NeuNumberInputState } from '@neural-ui/core/number-input';
// Public declaration (reference only)
export type NeuNumberInputState = 'valid' | 'incomplete' | 'invalid';
Load Core styles once. Use the public tokens below for local customization or a preset for application-wide changes. Keep labels, focus, selected options and disabled states readable in both light and dark themes.
Specific tokens
Token
Purpose
State / variant
Default / source
Fallback
--neu-number-input-btn-size
Inherited theme value used by this component
Field surface
2remRoot declaration
No token alias
--neu-number-input-height
Inherited theme value used by this component
Field surface
48pxRoot declaration
No token alias
--neu-number-input-stacked-min-width
Inherited theme value used by this component
Field surface
120pxRoot declaration
No token alias
--neu-number-input-width
Inherited theme value used by this component
Field surface
80pxRoot declaration
No token alias
Shared tokens used
Override these on a local wrapper to affect this example. An override on :root affects other components that use the same token.
Token
Purpose here
Other impact
Default / fallback
--neu-border
Normal control and cell borders
Shared by other Core consumers; scope the override.
rgba(15, 23, 42, 0.08)
--neu-focus-ring
Normal keyboard-focus ring
Shared by other Core consumers; scope the override.