Skip to main content

The Radio Group component for Retool Mobile

A radio button group to select a single option from a list.

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.

disabled

Whether input, interaction, selection, or triggering is disabled.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector > Interaction > Disabled
MethodsetDisabled()
Default
false
Examples
true

labels

A list of labels for each item. Falls back to the corresponding value if no label is provided.

Type array
Array values string
Mutability Read-only
Default
[]
Examples
["Label 1", "Label 2", "Label 3"]

value

The value.

Type number
Mutability Read-only

values

A list of possible values from which to select.

Type array
Mutability Read-only

Methods

JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.

radioGroup.clearValue()

Clear the current values.

Definition
radioGroup.clearValue()
Examples

Clear the current value of radioGroup.

radioGroup.clearValue();

radioGroup.focus()

Set focus on the input field.

Definition
radioGroup.focus()
Examples

Set focus on radioGroup.

radioGroup.focus();

radioGroup.resetValue()

Reset the current value to the default value.

Definition
radioGroup.resetValue()
Examples

Reset the current value of radioGroup.

radioGroup.resetValue();

radioGroup.setDisabled()

Set the disabled value to toggle whether the input field is disabled. Defaults to true without a parameter.

Definition
radioGroup.setDisabled(disabled)
Parameters

disabled

Whether input, interaction, selection, or triggering is disabled.

Type boolean
Format True/False
Default
false
Examples
true

Examples

Disable radioGroup.

radioGroup.setDisabled(true);

Enable radioGroup.

radioGroup.setDisabled(false);

radioGroup.setHidden()

Set the hidden value to toggle whether the component is visible. Defaults to true without a parameter.

Definition
radioGroup.setHidden(hidden)
Parameters

hidden

Whether this object is hidden from view.

Type boolean
Format True/False
Default
false
Examples
true

Examples

Hide radioGroup.

radioGroup.setHidden(true);

Unhide radioGroup.

radioGroup.setHidden(false);

radioGroup.setValue()

Set the current value.

Definition
radioGroup.setValue(value)
Parameters

value

The value.

Type string | number | boolean | object | array

Examples

Set the current value of radioGroup to userValue.

radioGroup.setValue(userValue);

Events

Events triggered by user interactions. You can configure event handlers in the IDE to trigger queries or other actions in response to events.

EventDescription
ChangeThe value is changed.