Import

import-number-field.ts
import { NuiNumberField, NuiNumberInput, NuiNumberStep } from '@needless-ui/angular/number-field';

NuiNumberField

Groups the input with its step buttons.

Selector
[nuiNumberField]

NuiNumberInput

A text input that holds a number, as an ARIA spinbutton.

Selector
input[nuiNumberInput]
NuiNumberInput: Properties
NameTypeDefaultDescription
valueTwo-waynumber | nullnullThe number, or null when empty. Also works with forms.
minInputnumberSmallest allowed value.
maxInputnumberLargest allowed value.
stepInputnumber1How much one step changes the value. The value snaps to it on blur.
formatInputIntl.NumberFormatOptions{}Intl.NumberFormat options, such as { style: 'currency', currency: 'EUR' }.
localeInputstringLOCALE_IDLocale for formatting and reading numbers.
disabledInputbooleanfalseDisables the input and its buttons.
stepByMethod(count: number) => voidSteps up (positive) or down (negative) by a number of steps.

NuiNumberStep

A step button. Holding it repeats.

Selector
button[nuiNumberStep]
NuiNumberStep: Properties
NameTypeDefaultDescription
nuiNumberStepInputnumber1 steps up and -1 steps down.
labelInputstringAccessible name. Defaults to “Increase” or “Decrease”.