Checkbox
A Fluent checkbox.
Example:
fluent.Checkbox(label="Remember me", value=True)
fluent.Checkbox(label="Select all", tristate=True) # indeterminate
fluent.Checkbox(label="Disabled", disabled=True)

Inherits: LayoutControl
Properties
Events
Example
Fluent Checkbox
import flet_fluent_ui as fluent
import flet as ft
def main(page: ft.Page):
page.title = "Fluent Checkbox"
def handle_change(e: ft.Event[fluent.Checkbox]):
status.value = "Accepted" if e.control.value else "Not accepted"
status = ft.Text("Not accepted")
page.add(
ft.SafeArea(
content=ft.Column(
controls=[
fluent.Checkbox(
label="Accept terms and conditions",
on_change=handle_change,
),
fluent.Checkbox(
label="Select all (tristate)", tristate=True, value=None
),
fluent.Checkbox(label="Disabled", value=True, disabled=True),
status,
],
)
)
)
if __name__ == "__main__":
ft.run(main)

Properties
autofocusclass-attributeinstance-attribute
autofocus: bool = FalseWhether this checkbox should be focused on initial display.
labelclass-attributeinstance-attribute
label: StrOrControl | None = NoneThe label shown next to this checkbox. Clicking it toggles the checkbox.
tristateclass-attributeinstance-attribute
tristate: bool = FalseWhether clicking cycles through checked, indeterminate (None) and
unchecked, instead of only checked and unchecked.
Events
on_changeclass-attributeinstance-attribute
on_change: ControlEventHandler[Checkbox] | None = NoneCalled when value changes.
The data property of the event handler argument
contains the new value.