This page provides instructions on using the Checkbox widget to allow users to check or clear an item.
These properties are customizable options present in the property pane of the widget, allowing users to modify the widget according to their preferences.
Sets the label of the Checkbox.
Allows you to choose the placement of the label. You can choose:
- Left - Aligns the text to the left of the Checkbox.
- Right - Aligns the text to the right of the Checkbox.
Alignment refers to how a label is positioned relative to a widget. By adjusting this property, you can control the visual alignment of the label within the widget's layout
This validation feature allows you to designate the Checkbox as a mandatory field. For instance, when the Checkbox is placed within a Form widget, enabling the Required property ensures that the Form's submit button remains disabled until the checkbox is checked.
Determines the default state of the checkbox, whether it is checked or unchecked.
JS next to the Visible property to conditionally control the widget's visibility.
JS next to the Disabled property to control the widget's disable state conditionally.
JS next to the property.
This property determines how the widget's height adjusts to changes in its content. There are three available options:
- Fixed: The height of the widget remains as set using drag and resize.
- Auto Height: The widget's height adjusts dynamically in response to changes in its content.
- Auto Height with limits: Same as Auto height, with a configurable option to set the minimum and maximum number of rows the widget can occupy.
This event defines the action that would be executed when the user checks or unchecks a checkbox. It allows you to specify a list of supported actions that can be triggered in response to the checkbox state change.
Style properties allow you to change the look and feel of the widget.
isChecked property indicates whether the checkbox is currently checked or not. It is represented by a boolean value, where true signifies that the checkbox is checked, and false signifies that it is unchecked.
isDisabled property reflects the state of the widget's Disabled setting. It is represented by a boolean value, where true indicates that the widget is disabled, and false indicates that it is enabled for user interaction.
isVisible property reflects the state of the widget's Visible setting. It is represented by a boolean value, where true indicates that the widget is visible, and false indicates that it is hidden or not displayed on the page.
Widget property setters enable you to modify the values of widget properties at runtime, eliminating the need to manually update properties in the editor.
These methods are asynchronous and return a Promise. You can use the
.then() block to ensure execution and sequencing of subsequent lines of code in Appsmith.
setVisibility (param: boolean): Promise
Sets the visibility of the widget.
setDisabled (param: boolean): Promise
Sets the disabled state of the widget.
setValue (param: boolean): Promise
Allows you to dynamically set the value of the Checkbox widget.
setRequired (param: boolean): Promise
Sets whether the widget is required or not.