Last modified: August 22, 2025
The CurrencyInput
component renders an input field with currency formatting, symbols, and locale-specific display patterns.

Prop | Type | Description |
---|---|---|
label Required | String | The label text to display for the form input element |
name Required | String | The unique identifier for the input element (like HTML name attribute) |
currency Required | String | ISO 4217 currency code (e.g., “USD”, “EUR”, “JPY”) |
value | Number | undefined | The current value of the input |
defaultValue | Number | undefined | The value of the input on the initial render. |
onChange | (value: number) => void | Callback when the value changes. |
onBlur | (value: number) => void | Callback when the input loses focus. |
onFocus | (value: number) => void | Callback when the input gains focus. |
min | Number | Sets the lower bound of the input (handled by underlying component). |
max | Number | Sets the upper bound of the input (handled by underlying component). |
precision | Number | Sets the number of decimal places for the currency. If not provided, defaults to currency-specific precision. |
error | Boolean | If true , shows validation message as error; if false , shows as success. Default is false . |
validationMessage | String | Text to show under the input for error/success validation. Default is '' . |
required | Boolean | Determines if the required indicator should be displayed. Default is false . |
readOnly | Boolean | Determines if the field is editable. Default is false . |
description | String | Instructional message to help understand the input’s purpose. |
tooltip | String | Text that appears in a tooltip next to the input label. |
placeholder | String | Text that appears when the input has no value. |