TriStateCheckBox

Introduction

As the name suggests, a TriStateCheckbox can basically adopt three different states: Checked, Unchecked and Mixed. The mixed state, however, cannot be directly reached by user interaction on the TriStateCheckBox. Instead, it can be set using the toggle function of the control.

Whenever the TriStateCheckBox changes its state, the change event is fired. The control provides the checkbox itself along with a descriptive text attribute which is also used as aria-label.

The control can also adopt different states like "error" and "warning", which are controlled by the valueState property. Additionally, it can be disabled or read-only by setting the corresponding properties(functions setEnabled and setEditable).

Examples

The main purpose of this control is to reflect the selection states of dependent input fields, as shown in the example below.

If all dependent checkboxes are checked, the TriStateCheckbox will adopt the same state (the same applying to the "unchecked" state).

TriStateCheckBox with dependent checkboxes

API Documentation

API documentation