Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain access. If you have not verified by September 26, 2025, your access may be on hold.
ui.Checkbox
Stay organized with collections
Save and categorize content based on your preferences.
A checkbox with a label.
| Usage | Returns | ui.Checkbox(label, value, onChange, disabled, style) | ui.Checkbox |
| Argument | Type | Details | label | String, optional | The checkbox's label. Defaults to an empty string. |
value | Boolean, optional | Whether the checkbox is checked. A null value indicates that the checkbox is in an indeterminate state. Defaults to false. |
onChange | Function, optional | A callback to fire when the value of the checkbox changes. The callback is passed a boolean indicating whether the checkbox is now checked and the checkbox widget. |
disabled | Boolean, optional | Whether the checkbox is disabled. Defaults to false. |
style | Object, optional | An object of allowed CSS styles with their values to be set for this widget. See style() documentation. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],["The core content describes a `ui.Checkbox` widget, its usage, and its arguments. It can be created using `ui.Checkbox()` and allows for a `label`, a boolean `value` (checked/unchecked/indeterminate), an `onChange` callback function, a `disabled` state, and custom `style`. The `onChange` callback receives the new boolean state and the widget itself. Each parameter is optional and has default values.\n"]]