A customizable checkbox that a user can toggle between a selected/checked and unselected/unchecked state.
Adding a Checkbox component
To add and use a Checkbox component:
- Select the Checkbox component from the Components drawer. You can open the list of components by clicking the
+button next to Components.
- The Checkbox component takes up a boolean variable. When the variable is true, the checkbox is in a selected state and when the variable is false, the component is in unselected taste.
- Select the Checkbox component in the Components tree.
- Go to the Data tab (third tab) in the Properties Panel.
- On Initial Value, select the boolean variable. This variable can be created under Variables modal or can be an incoming field from a REST API endpoint.
In the example below, the Initial Value property on the Checkbox is assigned to false.
To manipulate the value of the Checkbox in an API request, you will use the Screen variable mapped to its
Data Source property value to send as the body of the API request action. The 'Data Source' property value is available in the third tab.
|Component name||To alter the name of the component. The name is reflected in the Components tree. Defaults to Checkbox.|
|Color||Set the background color of the checkbox for its selected state.|
|Unselected Color||Set the background color of the checkbox for its unselected state.|
|Size||Size of the checkbox.|
|Checked Icon||Select an icon from the icon picker to display when for the selected state.|
|Unchecked Icon||Select an icon from the icon picker to display when for the unselected state.|
|Disabled||Initialize by a boolean value from a data source.|
Remove check functionality, gray out the checkbox, and sets it as unselected.
|Data Source||Initialize the stateful component with a value from a data source.|
The Checkbox component offers several ways for you to trigger Actions when a user interacts with it in your app.
|On Press||This Trigger will fire every time the Checkbox is clicked/tapped and runs the associated Actions|
|On Check||This Trigger will fire every time the Checkbox's state changes to 'checked' and runs the associated Actions|
|On Uncheck||This Trigger will fire every time the Checkbox's state changes to 'unchecked' and runs the associated Actions|
Updated 3 months ago