Currency Input


Install yarn add @spark-web/currency-input
Source GitHub.com
Bundle unpkg.com

Currency input provides a way for inputting money values. Note that this component is similar to the FloatInput component with the difference that this component has 2 fraction digits enforced and a currency symbol starting adornment.


The current value is: 1000

Currency Symbol Adornment

You can specify what currency type you'd like for the currency symbol adornment at the start of the input component. If unspecified, the currency symbol adornment will default to AUD. Note that the currency codes are references to the respective currency's ISO 4217 currency codes.



AdornmentsAsChildren: ReactElement<InputAdornmentProps, string | JSXElementConstructor<any>> | [ReactElement<InputAdornmentProps, string | JSXElementConstructor<any>>, ReactElement<InputAdornmentProps, string | JSXElementConstructor<...>>]

Adorn the input with ornamental element(s) to aid user input, or

interactive element(s) to augment user input. Each child **must** be

wrapped with the `InputAdornment` component to ensure proper layout,

otherwise it will not be rendered.


"BOV" | "CHE" | "CHF" | "CHW" | "CLF" | "COU" | "MAD" | "MXV" | "UYI" | "UYW" | "XUA" | "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | ... 162 more ... | "ZWL"

Specifies what currency symbol you want as a starting adornment to the component.



Sets data attributes on the component.

Sets data attributes for the element.


(value: string | number) => void


string | number

Note that CurrencyInput also extends FloatInput's props and are not listed here.

© 2023 Brighte Capital Pty Ltd