Number Input
Overview
Use the number input component to prompt the user to enter a numeric value.
These numeric values can be integers or can include a decimal point with a fractional part if needed.

Development
Web component development
Component reference
p-inputNumber
Allows user to edit values that have a formatted number
View the p-inputNumber reference doc
If you're adding PrimeNG to your solution for the first time, reference their setup documentation. It's important to note that the inclusion of the nova-light theme css is not necessary to work with Responsive UI. Styling for the PrimeNG components is provided by Responsive UI's theming.
Implementation
Begin by importing the InputNumberModule module into your application.
Add a PrimeNG p-inputNumber component. Add rui-form-control as the inputStyleClass to inherit the correct styling.
Depending on the type of formatting needed, reference the PrimeNG InputNumber documentation and add the corresponding properties. For integer-only examples, no additional properties are needed.
For decimal examples, bind mode to decimal and locale to en-US. You can also set optional properties, including minFractionDigits, step, min, and max.
Angular component development
Component reference
p-inputNumber
Allows user to edit values that have a formatted number
View the p-inputNumber reference doc
If you're adding PrimeNG to your solution for the first time, reference their setup documentation. It's important to note that the inclusion of the nova-light theme css is not necessary to work with Responsive UI. Styling for the PrimeNG components is provided by Responsive UI's theming.
Implementation
Begin by importing the InputNumberModule module into your application.
Add a PrimeNG p-inputNumber component. Add form-control as the inputStyleClass to inherit the correct styling.
Depending on the type of formatting needed, reference the PrimeNG InputNumber documentation and add the corresponding properties. For integer-only examples, no additional properties are needed.
For decimal examples, bind mode to decimal and locale to en-US. You can also set optional properties, including minFractionDigits, step, min, and max.
Design
Figma design
| Dev Component | Design Component Name |
|---|---|
| Number input | Add text and apply the “rui/regular” text style and “rui-pacific/text-regular” color style. Suffix the field label with a colon. |
Adobe XD design
- Sample App - Editing Form Data
| Dev Component | Design Component Name |
|---|---|
| Number input | JHA / Forms / Text Input
|