Appearance
Function: currencyField()
ts
function currencyField(props: UiCurrencyFieldProps): Element;Defined in: src/UI/blocks/currencyField.tsx:48
Parameters
| Parameter | Type | Description |
|---|---|---|
props | UiCurrencyFieldProps | Configuration object |
Returns
Element
Deprecated
Use the equivalent block from @matterway/sdk/UI instead. This block targets the old showUI path and will be removed when src/UI/ is dropped.
Currency input field component with currency icon prefix.
Examples
Basic usage with required props
currencyField({
name: 'price',
label: 'Price',
currency: 'dollar'
});Usage with default value and different currency
currencyField({
name: 'salary',
label: 'Monthly Salary',
currency: 'euro',
defaultValue: '5000',
placeholder: 'Enter amount',
required: true,
disabled: false
});