CheckboxElement
class aids in creating checkbox input elements in a user interface.
Name | Type | Description |
---|---|---|
elementId | string | This property in constructor accepts the Id for the element |
label | string | This property in constructor accepts the label for checkbox |
options | Array<OptionElement> | This property in constructor accepts options for checkbox |
CheckboxElement
class:
CheckboxElement
is created with an elementId “1”, a label “Choose options”, and a list of two options.
setDefaultValue()
method sets the default value(s) in the checkbox input, while the getDefaultValue()
retrieves it.
For example:
CheckboxElement
: