Checkbox
A customizable checkbox that a user can toggle between a selected/checked and unselected/unchecked state.
How to use
- 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.
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.
Style Properties
Style properties allow you to customize the look and feel of the component. Combinations of styles applied to components can be saved as Stylesheets to easily reuse styles throughout your app. Styles can also be set dynamically using Variables. To learn more about all the different styling properties and how they work, take a look at Intro to Styling.
Component Specific Styles
Property | Description |
---|---|
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. |
Configuration Properties
Property | Description |
---|---|
Component name | To alter the name of the component. The name is reflected in the Components tree. Defaults to Checkbox. |
Data Configuration
Property | Description |
---|---|
Data Source | Initialize the stateful component with a value from a data source. |
Disabled | Initialize by a boolean value from a data source. Remove check functionality, gray out the checkbox, and sets it as unselected. Accepted values: true or false . |
Checked Icon | Select an icon from the icon picker to display when for the selected state. |
Custom Checked Icon | Render an icon using a string of the icon's identifier. Overrides the 'icon' property. Full list of icons here. Ex: 'Foundation/align-right', 'Feather/check' |
Unchecked Icon | Select an icon from the icon picker to display when for the unselected state. |
Custom Unchecked Icon | Render an icon using a string of the icon's identifier. Overrides the 'icon' property. Full list of icons here. Ex: 'Foundation/align-right', 'Feather/check' |
Conditional Display
You can conditionally display a component based on a given condition. Learn more about conditionally displaying components in the Conditional Display doc.
Triggers
The Checkbox component offers several ways for you to trigger Actions when a user interacts with it in your app.
Name | Description |
---|---|
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 6 months ago