Checkbox lets users select independent options and can also represent the selection state of a group.
Dual-state is applied using the boolean attribute [checked] to show whether the checkbox is checked or not.
The indeterminate state is applied using the boolean attribute [indeterminate] and can be used when you have a group of options and a higher-level checkbox should reflect their state:
[indeterminate]="true").When the user clicks on a kbq-checkbox, the default behavior toggles the checked value and sets indeterminate to false.
This behavior can be configured by providing a new value for KBQ_CHECKBOX_CLICK_ACTION on the checkbox.
providers: [
{ provide: KBQ_CHECKBOX_CLICK_ACTION, useValue: 'check' }
];Possible values: noop, check, check-indeterminate
To show a validation error, bind the checkbox to a form control, apply required or Validators.requiredTrue, and put the error text in a kbq-error inside the checkbox.
To show the error at another moment, for example only after the form is submitted, pass a matcher to the errorStateMatcher input. The matchers are described in the Validation guide.