The Currency component for Retool Apps
An input field to enter a monetary number value.
Currency is a preset version of Number Input. It has been preconfigured with common options for currency input.
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
allowNull
Whether to allow and validate a null
value instead of 0
if the input field is empty.
Type | boolean |
Format | True/False |
Configurability | Inspector > Interaction > Validation rules > Allow null |
Default | false |
Examples
true
currency
A three-letter ISO currency code to use if format
is currency
.
Type | string |
Configurability | Inspector |
Default | null |
decimalPlaces
The number of decimal places to display. If necessary, values round up or down automatically.
Type | number |
Format | Integer |
Configurability | Inspector > Content > Decimal places |
Default | null |
disabled
Whether input, interaction, selection, or triggering is disabled.
Type | boolean |
Format | True/False |
Configurability | Inspector > Interaction > Disabled |
Default | false |
Examples
true
events
A list of configured event handlers that trigger actions or queries.
Type | array |
Array values | object |
Configurability | Inspector > Interaction > Event handlers |
Default | null |
Array Object Properties
event
The event that triggers the action. Refer to the events section for details of available events for this object.
Type | string |
Configurability | Inspector > Interaction > Event handlers > Event |
Default | null |
method
The JavaScript method to perform when type
is datasource
, widget
, state
, or localStorage
.
Type | string |
Configurability | Inspector > Interaction > Event handlers > Edit event handler > Run script actions |
Default | null |
type
The type of action to perform.
Type | string | ||||||||||||||
Configurability | Inspector > Interaction > Event handlers > Edit event handler > Action | ||||||||||||||
Allowed Values |
| ||||||||||||||
Default | null |
format
The formatting style to use.
Type | string | ||||||||
Configurability | Inspector | ||||||||
Allowed Values |
| ||||||||
Default | null |
iconAfter
The suffix icon to display.
Type | string |
Format | Icon Key |
Configurability | Inspector > Content > Add-ons > Suffix icon |
Default | null |
Examples
/icon:bold/shopping-gift
iconBefore
The prefix icon to display.
Type | string |
Format | Icon Key |
Configurability | Inspector > Content > Add-ons > Prefix icon |
Default | null |
Examples
/icon:bold/shopping-gift
id
The unique identifier (name).
Type | string |
Format | Plain Text |
Configurability | Inspector |
Default | currency1 |
Examples
query1
button1
inputTooltip
The tooltip helper text to display below the input on focus.
Type | string |
Format | Plain Text |
Configurability | Inspector > Content > Add-ons > Helper text |
Default | `Shift+Enter` to save, `Esc` to cancel |
Examples
`Shift+Enter` to save, `Esc` to cancel
isHiddenOnDesktop
Whether to show or hide this object in the desktop layout.
Type | boolean |
Format | True/False |
Configurability | Inspector > Appearance > Advanced > Show on desktop |
Default | false |
Examples
true
isHiddenOnMobile
Whether to show or hide this object in the mobile layout.
Type | boolean |
Format | True/False |
Configurability | Inspector > Appearance > Advanced > Show on mobile |
Default | true |
Examples
true
labelPosition
The position of the label relative to the input field or value.
Type | string | |||||||||
Format | Plain Text | |||||||||
Configurability | Inspector > Content > Add-ons > Label > Position | |||||||||
Allowed Values |
| |||||||||
Default | left |
Examples
top
loading
Whether to display a loading indicator.
Type | boolean |
Format | True/False |
Configurability | Inspector > Interaction > Loading |
Default | false |
Examples
true