Checkbox Group
A group of checkboxes to toggle boolean values. Switch Group can group switches buttons in one or more columns, or wrap horizontally. It supports validation of required field, minimum or maximum selection, and custom rules.
Properties
Available properties for Checkbox Group with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read information about components.
The current value.
A list of captions for each item, by index.
The source data for the component.
Whether user input, interaction, or selection is disabled.
A list of boolean values for each item, by index, that reflect whether they are disabled.
A list of values not available for selection.
The key used by a Form component to assign default values to input fields using form.initialData
, and to construct the form.data
property.
The layout of grouped items.
Whether the height automatically resizes to fit content or is a fixed size.
Whether the component is visible.
A list of boolean values for each item, by index, that reflect whether they are hidden.
Whether to hide the validation message if the invalid
is true
.
Whether the current value has failed any validation rules.
The configuration mode for option lists. Either dynamic
for mapped options or static
for manual options.
The text to display as a label for the input field.
The horizontal alignment of the label.
The additional text to display with the label.
The position of the label relative to the input field.
The label width, in the unit specified in labelWidthUnit
.
The specified units for labelWidth
.
Whether the label can wrap to multiple lines.
A list of labels for each item. Falls back to the corresponding value
if no label is provided.
Whether the component takes up space on the canvas if hidden
is true
.
The amount of margin to render outside of the component.
The maximum number of items to allow.
The minimum width of a column when using a multi-column layout.
The minimum number of items to allow.
The overflow behavior when the contents exceeds the height of the component. Either scroll
to display a scrollbar or hidden
to clip the contents.
Whether the input is required for validation.
A list of currently selected values, by index.
A list of currently selected items.
A list of labels for currently selected values, by index.
Whether the component remains visible in the editor if hidden
is true
.
A list of tooltips for each item, by index.
The text to display in a tooltip on hover or focus.
The validation message to display if the input is invalid.
A list of possible values.
Events
Events are triggered by user interactions with Checkbox Group. Use event handling to trigger queries or other actions in response to events.
A user changes the current value.
Methods
Methods for interacting with Checkbox Group. You can write JavaScript almost anywhere in Retool and use methods to manipulate data or components.
Set the current value.
Clear the current value.
Scrolls the canvas or parent container so that the selected component appears in the visible area.
Validates the value of the input field.
Clear the validation message from the input field.
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
Set the disabled
value to toggle whether the input field is disabled. Defaults to true
without a parameter.
Reset value
to the default value.
Set focus on the input field.
Removes focus on the input field.