The URL component for Retool Apps
An input field to enter a URL.
URL is a preset version of Text Input. It has been preconfigured with common options for URL 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.
autoCapitalize
The type of automatic capitalization that the browser can automatically perform when using virtual or on-screen keyboards.
Type | string | ||||||||||
Format | Plain Text | ||||||||||
Mutability |
| ||||||||||
Allowed Values |
| ||||||||||
Default |
|
Examples
"words"
autoComplete
Whether the browser can perform autocomplete on the input field.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
autoFill
The data type of the input field for browsers to autofill if autoComplete
is true
.
Type | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Format | Plain Text | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Mutability |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Allowed Values |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Default |
|
Examples
"email"
disabled
Whether input, interaction, selection, or triggering is disabled.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
true
enforceMaxLength
Whether to enforce the maximum length.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
iconAfter
The suffix icon to display.
Type | string | ||||
Format | Icon Key | ||||
Mutability |
| ||||
Default |
|
Examples
/icon:bold/shopping-gift
iconBefore
The prefix icon to display.
Type | string | ||||
Format | Icon Key | ||||
Mutability |
| ||||
Default |
|
Examples
/icon:bold/shopping-gift
inputTooltip
The tooltip helper text to display below the input on focus.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
`Shift+Enter` to save, `Esc` to cancel
label
The text label to display.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
"Label"
labelPosition
The position of the label relative to the input field or value.
Type | string | |||||||||
Format | Plain Text | |||||||||
Mutability |
| |||||||||
Allowed Values |
| |||||||||
Default |
|
Examples
top
loading
Whether to display a loading indicator.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
maxLength
The maximum number of characters to allow.
Type | number | ||||
Format | Integer | ||||
Mutability |
| ||||
Default |
|
Examples
100
minLength
The minimum number of characters to allow.
Type | number | ||||
Format | Integer | ||||
Mutability |
| ||||
Default |
|
Examples
20
pattern
A regular expression (regex), without forward slashes around the pattern, to validate input if patternType
is regex
.
Type | string | ||||
Format | Regular Expression | ||||
Mutability |
| ||||
Default |
|
Examples
^[a-zA-Z0-9]+$
patternType
The pattern with which to validate the input.
Type | string | ||||||||
Format | Plain Text | ||||||||
Mutability |
| ||||||||
Allowed Values |
| ||||||||
Default |
|
placeholder
The text to display within the input field when there is no value.
Type | string | ||||
Format | string | ||||
Mutability |
| ||||
Default |
|
Examples
Enter a value
readOnly
Whether user input is read-only.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
required
Whether a value is required to be selected.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
showCharacterCount
Whether to display a character count with the input field.
Type | boolean | ||||
Mutability |
|
showClear
Whether to display a button to clear the value of the input field.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
spellCheck
Whether the browser can perform spellcheck on the input field.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
textAfter
The suffix text to display.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
USD
px
@example.com
textBefore
The prefix text to display.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
$
Email address
SKU
tooltipText
The tooltip text to display next to the label on hover.
Type | string | ||||
Format | Markdown | ||||
Mutability |
| ||||
Default |
|
Examples
Submit
value
The current or default value.
Type | string | ||||||
Format | Plain Text | ||||||
Mutability |
| ||||||
Default |
|
Examples
Hello world!
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
url.blur()
Examples
Remove focus from url
.
url.blur();
url.clearValidation()
Examples
Clear the validation message from url
.
url.clearValidation();
url.clearValue()
Examples
Clear the current value of url
.
url.clearValue();
url.resetValue()
Examples
Reset the current value of url
.
url.resetValue();
url.scrollIntoView()
Scrolls the canvas or parent container so that the selected component appears in the visible area.
url.scrollIntoView(options)
Parameters
options
Required
The scroll options.
Object Properties
behavior
Required
The scroll behavior.
Supported Values
auto | Scroll immediately to the specified position. |
smooth | Scroll gradually to the specified position. |
block
Required
The scroll position relative to the component.
Supported Values
nearest | Scrolls only the minimum amount required for the component to appear in the visible area. Scrolling does not occur if the component is already in view. |
start | Scrolls to position the component at the top of the visible area. |
center | Scrolls to position the component in the middle of the visible area. |
end | Scrolls to position the component at the bottom of the visible area. |
Examples
Scroll the minimum amount to immediately bring url
into view.
url.scrollIntoView({behavior: 'auto', block: 'nearest'});
url.setDisabled()
Set the disabled
value to toggle whether the input field is disabled. Defaults to true
without a parameter.
url.setDisabled(disabled)
Parameters
disabled
Whether input, interaction, selection, or triggering is disabled.
Examples
Disable url
.
url.setDisabled(true);
Enable url
.
url.setDisabled(false);
url.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
url.setHidden(hidden)
Parameters
hidden
Whether this object is hidden from view.
Examples
Hide url
.
url.setHidden(true);
Unhide url
.
url.setHidden(false);
url.setValue(value)
Parameters
value
Examples
Set the current value of url
to userValue
.
url.setValue(userValue);
Events
Events triggered by user interactions. Use event handlers to trigger queries or other actions in response to events.