The AmountInput is a number input designed to handle currency amounts.
View source codeAmountInputCurrencyThe currency to display.
(event: ChangeEvent<HTMLInputElement>, newValue: number) => voidHandler that is called when the value changes. When reading the new value, it is recommended to use the 'newValue' parameter rather than event.target.valueAsNumber to ensure the value is correctly formatted.
numberThe current value (controlled).
stringclassName for the element.
AmountInputCurrency[]The list of currencies to display in the dropdown.
"content" | "parent"Whether the AmountInput should fit its parent or content.
Default: contentbooleanWhether the AmountInput allows negative values.
stringThe id of the AmountInput.
booleanWhether the AmountInput is disabled.
booleanWhether the AmountInput is invalid.
ReactNodeLeft addon of the input.
stringThe name of the AmountInput, used when submitting an HTML form.
FocusEventHandler<HTMLInputElement>Handler that is called when the element loses focus.
FocusEventHandler<HTMLInputElement>Handler that is called when the element receives focus.
KeyboardEventHandler<HTMLInputElement>Handler that is called when a key is pressed.
ClipboardEventHandler<HTMLInputElement>Handler called when clipboard content is pasted into the amount field.
(selectedCurrency: AmountInputCurrency, newValue: number) => voidHandler that is called when a currency is selected.
stringTemporary text that occupies the AmountInput when it is empty.
"default" | "magicGradient"The visual style of the AmountInput.
Default: default