Skip to main content

change

Description

fires when the state of a checkbox is changed

Parameters

The callback of the event takes an object with the following parameters:

  • value - (boolean) the state of a checkbox
  • inputValue - (any) input value associated with the checkbox

Example

<script>
function handleChange({value}) {
console.log(value);
}
</script>

<Checkbox label="Checkbox" onchange={handleChange}/>

Details

The handler function receives an object with the state of the selected checkbox and its value.

Related article: Catching the change of a checkbox state