Getting Started
Overview
Installation
Theme
Forms
Basic Inputs
Select
Custom Inputs
Components
Navigation
Components
69
Micro Charts
Libraries
Kanban Board
Image Designer
Video Player
Visual Builder
Content Editor
Data View
Latest npm version of @ngstarter-ui/componentsWeekly npm downloads of @ngstarter-ui/components
Purchase

Number Input

Number Input is a form control for entering numeric values with optional increase and decrease controls. Use it when users need to type a number or adjust it by a step.

Use it for quantities, limits, thresholds, durations, percentages, ratings, numeric settings, seat counts, day counts, and budget-like numeric values.

Place ngs-number-input inside one ngs-form-field. Use Angular forms with ngModel or formControlName, and use min, max, and step to control allowed values. Use custom increase and decrease templates only when the default controls do not fit the design.

Do not use Number Input for text, phone numbers, OTP codes, currency selection, sliders, display-only KPI values, progress, or charts.

Key Features:
  • Value Constraints: Set min and max limits for numeric input.
  • Step Intervals: Define the increment/decrement value for adjustments.
  • Custom Controls: Use default buttons or provide your own templates for increase/decrease actions.
  • Form Integration: Works seamlessly with Angular Template-driven and Reactive Forms.
PropTypeDefault
min
Minimum value of the input
numberundefined
max
Maximum value of the input
numberundefined
step
Step value for increment/decrement
number1
readonly
Whether the input is readonly
booleanfalse
disabled
Whether the input is disabled
booleanfalse
required
Whether the input is required
booleanfalse
placeholder
The placeholder text
string''
value
The current value of the input
number | undefinedundefined
EventDescription
valueChangeEmitted when the value changes