CupertinoCheckbox
A macOS style checkbox.
Checkbox allows to select one or more items from a group, or switch between two mutually exclusive options (checked or unchecked, on or off).
ft.Column(
intrinsic_width=True,
controls=[
ft.CupertinoCheckbox(),
ft.CupertinoCheckbox(label="Checked", value=True),
ft.CupertinoCheckbox(label="Disabled", disabled=True),
],
)

Inherits: LayoutControl
Properties
active_color- The color used to fill checkbox when it is checked/selected.autofocus- Whether this checkbox will be selected as the initial focus.border_side- Defines the checkbox's border sides in all or specificControlStatestates.check_color- The color to use for the check icon when this checkbox is checked.fill_color- The color used to fill this checkbox in all or specificControlStatestates.focus_color- The color used for this checkbox's border shadow when it has the input focus.label- A clickable label to display on the right of this checkbox.label_position- Defines on which side of this checkbox thelabelshould be shown.mouse_cursor- The cursor for a mouse pointer entering or hovering over this checkbox.semantics_label- The semantic label for this checkbox that will be announced by screen readers.shape- The shape of this checkbox.spacing- The space between this checkbox and thelabel.tristate- IfTrue, this checkbox'svaluecan beTrue,False, orNone.value- The value of this checkbox.
Events
Examples
Cupertino, Material and Adaptive Checkboxes
import flet as ft
def main(page: ft.Page):
page.add(
ft.SafeArea(
content=ft.Column(
controls=[
ft.CupertinoCheckbox(label="Cupertino Checkbox", value=True),
ft.Checkbox(label="Material Checkbox", value=True),
ft.Container(height=20),
ft.Text(
value=(
"Adaptive Checkbox shows as CupertinoCheckbox on macOS "
"and iOS and as Checkbox on other platforms:"
)
),
ft.Checkbox(
adaptive=True,
label="Adaptive Checkbox",
value=True,
),
],
),
)
)
if __name__ == "__main__":
ft.run(main)
