Checkbox

Checkboxes allow for two-state control over data on the device.

Displays an indeterminate state if the device doesn't match the checked or unchecked states.


Screenshot of component Checkbox checked

Screenshot of component Checkbox unchecked

Screenshot of component Checkbox indeterminate

Usage

This checkbox reads and writes state to the bright messageID. It will write 255 if checked, 0 if unchecked.

If the device state doesn't match either of these, it will display the indeterminate state [-].

import { Checkbox } from '@electricui/components-desktop-blueprint'
 
<Checkbox
accessor={state => state.bright}
checked={255}
unchecked={0}
writer={(state, value) => {
state.bright = value
}}
>
Brightness
</Checkbox>