addonProps
Description
Props for addon component.
Type
HTMLUIPropsLeave Yamada UI a star
StarNumberInput is a component used to obtain numeric input from the user.
Description
Props for addon component.
Type
HTMLUIPropsDescription
If true, the input's value will change based on mouse wheel.
Type
booleanDefault
falseDescription
This controls the value update when you blur out of the input.
- If true and the value is greater than max, the value will be reset to max.
- Else, the value remains the same.
Type
booleanDefault
trueDescription
The visual color appearance of the component.
Type
"blackAlpha" | "whiteAlpha" | "amber" | "blue" | "info" | "link" | "primary" | "cyan" | "emerald" | "flashy" | "fuchsia" | "gray" | "green" | "success" | "indigo" | "lime" | "neutral" | "orange" | "warning" | "pink" | "purple" | "red" | "danger" | "rose" | "sky" | "teal" | "violet" | "secondary" | "yellow"Description
Props for container element.
Type
HTMLUIPropsDescription
Props for decrement component.
Type
NumberDecrementStepperPropsDescription
The initial value of the counter.
Should be less than max and greater than min.
Type
string | numberDescription
The border color when the input is invalid.
Type
"border" | "link" | BorderColor | "amber.50" | "amber.100" | "amber.200" | "amber.300" | "amber.400" | "amber.500" | "amber.600" | "amber.700" | "amber.800" | "amber.900" | ... 319 more ... | [...]Description
The border color when the input is focused.
Type
"border" | "link" | BorderColor | "amber.50" | "amber.100" | "amber.200" | "amber.300" | "amber.400" | "amber.500" | "amber.600" | "amber.700" | "amber.800" | "amber.900" | ... 319 more ... | [...]Description
If true, the input will be focused as you increment or decrement the value with the stepper.
Type
booleanDefault
trueDescription
If using a custom display format, this converts the default format to the custom format.
Type
(value: string | number) => string | numberDescription
This is used to format the value so that screen readers
can speak out a more human-friendly value.
It is used to set the aria-valuetext property of the input.
Type
(value: string | number) => string | undefinedDescription
Props for increment component.
Type
NumberIncrementStepperPropsDescription
If true, the form control will be invalid.
Type
booleanDefault
falseDescription
If true, the form control will be disabled.
Deprecated
Use disabled instead.
Type
booleanDefault
falseDescription
If true, the form control will be invalid.
Deprecated
Use invalid instead.
Type
booleanDefault
falseDescription
If true, the form control will be readonly.
Deprecated
Use readOnly instead.
Type
booleanDefault
falseDescription
If true, the form control will be required.
Deprecated
Use required instead.
Type
booleanDefault
falseDescription
If true, display the addon for the number input.
Deprecated
Use stepper instead.
Type
booleanDescription
Whether the pressed key should be allowed in the input. The default behavior is to allow DOM floating point characters defined by /^[Ee0-9+-.]$/.
Type
(value: string) => booleanDescription
This controls the value update behavior in general.
- If true and you use the stepper or up/down arrow keys,
the value will not exceed the max or go lower than min.
- If false, the value will be allowed to go out of range.
Type
booleanDefault
trueDescription
The maximum value of the counter
Type
numberDefault
Number.MAX_SAFE_INTEGERDescription
The minimum value of the counter
Type
numberDefault
Number.MIN_SAFE_INTEGERDescription
The callback fired when the value changes.
Type
(valueAsString: string, valueAsNumber: number) => voidDescription
The callback invoked when invalid number is entered.
Type
(
message: ValidityState,
value: string,
valueAsNumber: number,
) => voidDescription
If using a custom display format, this converts the custom format to a format parseFloat understands.
Type
(value: string) => stringDescription
The number of decimal points used to round the value.
Type
numberDescription
The size of the NumberInput.
Type
"xs" | "sm" | "md" | "lg" | "xl"Default
"md"Description
The step used to increment or decrement the value.
Type
numberDefault
1Description
If true, display the addon for the number input.
Type
booleanDescription
The value of the counter.
Should be less than max and greater than min.
Type
string | numberDescription
The variant of the NumberInput.
Type
"filled" | "flushed" | "outline" | "unstyled"Default
"outline"Description
If true, the input's value will change based on mouse wheel.
Type
booleanDefault
falseDescription
This controls the value update when you blur out of the input.
- If true and the value is greater than max, the value will be reset to max.
- Else, the value remains the same.
Type
booleanDefault
trueDescription
The initial value of the counter.
Should be less than max and greater than min.
Type
string | numberDescription
If true, the form control will be disabled.
Type
booleanDescription
If true, the input will be focused as you increment or decrement the value with the stepper.
Type
booleanDefault
trueDescription
If using a custom display format, this converts the default format to the custom format.
Type
(value: string | number) => string | numberDescription
This is used to format the value so that screen readers
can speak out a more human-friendly value.
It is used to set the aria-valuetext property of the input.
Type
(value: string | number) => string | undefinedType
stringDescription
Hints at the type of data that might be entered by the user. It also determines the type of keyboard shown to the user on mobile devices.
Type
type ONLY_FOR_FORMAT =
| "text"
| "search"
| "decimal"
| "none"
| "tel"
| "url"
| "email"
| "numeric"Default
'decimal'Description
If true, the form control will be invalid.
Type
booleanDefault
falseDescription
If true, the form control will be disabled.
Deprecated
Use disabled instead.
Type
booleanDefault
falseDescription
If true, the form control will be invalid.
Deprecated
Use invalid instead.
Type
booleanDefault
falseDescription
If true, the form control will be readonly.
Deprecated
Use readOnly instead.
Type
booleanDefault
falseDescription
If true, the form control will be required.
Deprecated
Use required instead.
Type
booleanDefault
falseDescription
Whether the pressed key should be allowed in the input. The default behavior is to allow DOM floating point characters defined by /^[Ee0-9+-.]$/.
Type
(value: string) => booleanDescription
This controls the value update behavior in general.
- If true and you use the stepper or up/down arrow keys,
the value will not exceed the max or go lower than min.
- If false, the value will be allowed to go out of range.
Type
booleanDefault
trueDescription
The maximum value of the counter
Type
numberDefault
Number.MAX_SAFE_INTEGERDescription
The minimum value of the counter
Type
numberDefault
Number.MIN_SAFE_INTEGERDescription
The HTML name attribute used for forms.
Type
stringType
FocusEventHandler<HTMLInputElement>Description
The callback fired when the value changes.
Type
(valueAsString: string, valueAsNumber: number) => voidType
FocusEventHandler<HTMLInputElement>Description
The callback invoked when invalid number is entered.
Type
(
message: ValidityState,
value: string,
valueAsNumber: number,
) => voidDescription
If using a custom display format, this converts the custom format to a format parseFloat understands.
Type
(value: string) => stringDescription
The pattern used to check the <input> element's value against on form submission.
Type
stringDefault
'[0-9]*(.[0-9]+)?'Description
The number of decimal points used to round the value.
Type
numberDescription
If true, the form control will be readonly.
Type
booleanDescription
If true, the form control will be required.
Type
booleanDescription
The step used to increment or decrement the value.
Type
numberDefault
1Description
The value of the counter.
Should be less than max and greater than min.
Type
string | numberEdit this page on GitHub