Numeric input library
Numora is a zero-dependency TypeScript library that turns any <input> element into a precision numeric input. Unlike <input type="number">, Numora uses type="text", so you decide which characters can be typed, pasted and shown.
Why numora?
If you audit the codebases of the top 10 DeFi protocols - Uniswap, Aave, Curve, Balancer - you'll notice a pattern. For the most critical UI component in finance, the numeric input, every single one has built a custom implementation from scratch.
- Uniswap maintains ~200 lines of custom regex and locale logic.
- Aave wraps a formatting library with heavy custom validation.
- Curve relies on a complex chain of hooks to handle state.
There is no standard. Every team wastes days reinventing the wheel: comma/dot separator logic, parseFloat precision loss, mobile keyboard ghost characters.
numora is the new standard for numeric inputs - a precision-first library you drop in once, configure with options, and forget about.
See Installation for the vanilla JS API and options. numora-react is built on the same core.
Use Numora in your framework
- Svelte numeric input. A short
use:numoraaction for Svelte 5 and SvelteKit (SSR-safe). - Vue numeric input. A
v-numoradirective for Vue 3. Works with Nuxt 3, VeeValidate, FormKit and Pinia. - Angular numeric input. A standalone directive that works with
ControlValueAccessorandFormControl<string>for Reactive Forms. - SolidJS numeric input. A
use:numoradirective that writes the raw value into acreateSignal. Works with SolidStart. - React numeric input. The
numora-reactpackage has a drop-in<NumoraInput />component with TypeScript types and React Hook Form support.