Currency Input

Input component for currency values

usd

$

Was this example helpful?

Usage#


Code
import { CurrencyInput } from "@medusajs/ui"
Code
<CurrencyInput symbol="$" code="usd" />

API Reference#


This component is based on the input element and supports all of its props

PropTypeDefault
symbol
string
-
code
string
-
size
"small"
|"base"
"base"
allowDecimals
boolean
-
allowNegativeValue
boolean
-
className
string
-
customInput
ElementType
-
decimalScale
number
-
decimalSeparator
string
-
decimalsLimit
number
-
defaultValue
string
|number
-
disableAbbreviations
boolean
-
disabled
boolean
-
disableGroupSeparators
boolean
-
fixedDecimalLength
number
-
formatValueOnBlur
boolean
-
groupSeparator
string
-
id
string
-
intlConfig
IntlConfig
-
maxLength
number
-
onValueChange
function
-
placeholder
string
-
step
number
-
transformRawValue
function
-
Was this helpful?

Examples#


Base#

usd

$

Was this example helpful?

Small#

usd

$

Was this example helpful?