Input Number
A number input component with controls.
Basic Usage
Basic numeric input with minimum and maximum constraints.
Value: 1
<prism-input-number [(value)]="quantity" [min]="1" [max]="10" />Precision & Step
Control the step increment and decimal precision.
Step 0.1, Precision 2
Step 0.01, Precision 3
<prism-input-number [precision]="2" [step]="0.1" [value]="10.55" />Sizes
Input Number supports sm, md, and lg sizes.
<prism-input-number size="sm" [value]="1" />
<prism-input-number size="md" [value]="1" />
<prism-input-number size="lg" [value]="1" />PrismInputNumber API
| Name | Type | Default | Description |
|---|---|---|---|
value | model<number | null> | null | Two-way bound numeric value. |
min | input<number> | -Infinity | Minimum allowed value. |
max | input<number> | Infinity | Maximum allowed value. |
step | input<number> | 1 | Step size for increment/decrement. |
precision | input<number | null> | null | Number of decimal places. |
placeholder | input<string> | '' | Placeholder text. |
disabled | model<boolean> | false | Whether the input is disabled. |
readonly | input<boolean> | false | Whether the input is read-only. |
size | input<'sm' | 'md' | 'lg'> | 'md' | Size of the input. |