Angular numeric input
Numora is an Angular numeric input library. It handles thousand separators, decimal limits, paste sanitization, scientific-notation expansion and cursor preservation in a standalone directive. Numora's value is a string end to end, so the directive works with ControlValueAccessor and FormControl<string> directly, and currency amounts never pass through IEEE 754 floating-point numbers. You need no numora-angular wrapper. The package is 8.3 kB gzipped with zero runtime dependencies.
Installation
Standalone directive with ControlValueAccessor
NumoraInput attaches directly to an existing <input> element. Implementing Angular's ControlValueAccessor on the directive lets the same <input numora> work with [(ngModel)] and Reactive Forms:
src/app/numora.directive.ts:
Use it directly on any <input>:
Or use it with Reactive Forms, where the raw value goes through FormControl:
A value the form sets goes through setValue(), which sanitizes it without calling onValueChange. With decimalMaxLength: 2, a control set to '1234.567' shows 1,234.56 but still holds '1234.567' until the user edits the field. Give the control values that already fit the options.
Template-driven forms work the same way with [(ngModel)]. The bare numora attribute uses the default options: the input's transform reads the empty string Angular passes for it as {}, so it also compiles under strictTemplates:
Numora adopts the <input> and sets the attributes it needs. The ControlValueAccessor methods connect it to the form. writeValue calls setValue, registerOnChange passes the raw value to the form control (see value types), and setDisabledState sets the element's disabled property. By default, Numora formats on every keystroke (see formatting).
Animated example: Numora + Torph in Angular
Stack a Torph TextMorph over a transparent-text NumoraInput. The Torph integration explains the overlay and has the shared CSS and install steps. Below is the standalone component.
Add the overlay CSS from the Torph page to your global styles, or to the component's styles array. In the styles array it needs ViewEncapsulation.None, because Numora creates the <input> at runtime, outside Angular's scoped styles. Global styles reach it either way.
FAQ
What is the best Angular numeric input library?
Numora is framework-agnostic TypeScript, 8.3 kB gzipped, with no runtime dependencies. In Angular you wrap NumoraInput in a standalone directive that implements ControlValueAccessor, so it works with Reactive Forms.
How do I add thousand separators to an Angular number input?
Nothing to configure. Grouping on every keystroke is the default. Numora formats as the user types and keeps the cursor between the same two digits when it inserts a comma. onValueChange receives { value, formattedValue }, where value is the raw value without separators. You can write it straight into a signal or a FormControl<string>.
Is there a numora-angular package?
No, and you do not need one. The standalone directive is the entire Angular adapter.
Does Numora integrate with Angular Reactive Forms?
Yes. The NumoraDirective implements ControlValueAccessor, so <input numora> works with [formControl] and [(ngModel)] (import FormsModule). The raw value is a string, which matches what FormControl<string> stores, so currency amounts never go through floating-point numbers.
Does it work with Angular SSR?
Yes. NumoraInput touches the DOM, so initialize it inside ngOnInit and guard with isPlatformBrowser if you target the server. Angular renders the empty <input> on the server and Numora adopts it in the browser.
Can I animate digits in Angular?
Yes. The Torph + Numora overlay pattern is vanilla DOM, so it works inside any Angular component template and Torph respects prefers-reduced-motion by default.
Why not use a native number input?
Native type="number" has no thousand separators or decimal limit, and its value is a floating-point number. Numora keeps the value as a string and preserves the cursor while formatting.