The input component Spinner provides a numerical input via increments and decrements using controls or buttons. But still, there is an option to use it as normal InputText too. A basic example of a Spinner would be as follows:
<p-spinner name="basic" size="30" [(ngModel)]="basicinput"></p-spinner>
The Spinner will be displayed with button controls, as shown in the following screenshot:
As shown in the snapshot, the value can be modified serially using the Spinner controls. Just like any other input component, Spinner supports the onChange event callback, which will be invoked upon a value change. The maximum number of characters allowed can be controlled through the maxlength property. The user interaction will be restricted through the readonly and disabled attributes.