Checkbox
Last updated
Was this helpful?
Last updated
Was this helpful?
The Checkbox component in Lowcoder enables users to select one or multiple options from a list, making it ideal for forms, settings, and preference selections.
Multiple Selections: Allow users to select multiple options simultaneously.
Customizable Labels: Define descriptive labels for each checkbox to enhance clarity.
Dynamic Binding: Bind checkbox states to data sources or variables for real-time updates.
Event Handling: Trigger actions based on user interactions, such as form submissions or data filtering.
Default State: Set checkboxes to be checked or unchecked by default.
Disabled State: Disable checkboxes to prevent user interaction when necessary.
Styling: Customize the appearance, including size, color, and spacing, to match your application's design.
Grouping: Organize multiple checkboxes into groups for better structure and logic.
Data Binding: Use Lowcoder's data binding syntax ({{ }}
) to connect checkbox states to variables or data sources.
Event Handling: Implement event handlers to perform actions when checkbox states change, such as updating a database or triggering other components.
Combining with Other Components: Integrate checkboxes with forms or filters to enhance user interaction and data collection.
On Component Playground, you can interact with the Checkbox component and explore it's Properties, Events and Methods. Play with different Styling properties to see the effect on the Checkbox component.
In the Auto-Docs of Checkbox component, we have shown how to use different properties of the Checkbox component. It also includes the Styling properties of the Checkbox component.
These properties are accessible in {{ }} notations, as well as in JavaScript Queries.
value
Array
Returns an Array containing the Current value of the options selected in the Checkbox component
disabled
Boolean
Returns True or False based on whether the Checkbox component is disabled or not
hidden
Boolean
Returns True or False based on whether the Checkbox component is hidden or not
invalid
Boolean
Returns True or False based on whether the Checkbox component is invalid or not
Events give you the ability to trigger further actions (with Event-Handlers).
Change
Triggers, when anything Changes on the Checkbox component
You have the capability to engage with components via their respective methods, which can be accessed by their designated names within any segment where JavaScript is utilized. Additionally, these components can be activated through the 'Control Component' action, which is triggered in response to specific events.
setValue() :
checkbox1.setValue() method sets the Checkbox component's Value property, which gets shown in the Checkbox component.
clearValue() :
checkbox1.clearValue() clears the Checkbox component's Value property and empties the value from the Checkbox component.
resetValue() :
checkbox1.resetValue() method resets the Checkbox component's value property to the default value of the Checkbox component.
setDefaultValue() :
checkbox1.setDefaultValue() method sets the Checkbox component's Default value, which gets shown in the Checkbox component as default.
clearDefaultValue() :
checkbox1.clearDefaultValue() clears the Checkbox component's Default value and empties the value from the Checkbox component.
resetDefaultValue() :
checkbox1.resetDefaultValue() method resets the Checkbox component's Default value to the default value of the Checkbox component.
Preference Settings: Allow users to select their preferences or settings.
Form Inputs: Collect multiple responses in surveys or questionnaires.
Data Filtering: Enable users to filter data based on selected criteria.
Feature Toggles: Allow users to enable or disable specific features or options.