Reference machines
checkbox
interface 2 type 4 function 1
# CheckboxContext
Members
togglestoggles: numberNumber of user-initiated toggles since construction.
valuevalue: CheckboxValueMirrored as
aria-checked("true" / "false" / "mixed").
# CreateCheckboxInput
Members
disabled?optional disabled?: booleaninitial?optional initial?: CheckboxValue
# CheckboxEvent
CheckboxEvent = { type: "TOGGLE"; } | { type: "SET"; value: CheckboxValue; } | { type: "DISABLE"; } | { type: "ENABLE"; }# CheckboxMachine
CheckboxMachine = Machine<CheckboxContext, CheckboxEvent, CheckboxState># CheckboxState
CheckboxState = "unchecked" | "checked" | "mixed" | "disabled"# CheckboxValue
CheckboxValue = "unchecked" | "checked" | "mixed"The visible value. 'mixed' = indeterminate (parent w/ partly-checked children).
# createCheckboxMachine ( )
createCheckboxMachine(input?): CheckboxMachineConstruct a fresh Checkbox machine.
Parameters
input?CreateCheckboxInput = {}
Returns
CheckboxMachine