Checkbox Widget in Kivy - Python Last Updated : 08 Oct, 2025 Comments Improve Suggest changes 9 Likes Like Report A CheckBox is a two-state button in Kivy that can be checked or unchecked. It is used along with a Label to indicate whether a setting is active. Checkboxes can also trigger events when their state changes.Let's see how to add a simple checkbox to a Kivy window.For Example: This example shows a single checkbox with a label. Python from kivy.app import App from kivy.uix.checkbox import CheckBox from kivy.uix.label import Label from kivy.uix.widget import Widget class BasicCheckBox(Widget): def __init__(self, **kwargs): super().__init__(**kwargs) self.lbl = Label(text='Accept Terms', pos=(20, 400)) self.add_widget(self.lbl) self.chk = CheckBox(pos=(150, 400), active=False) self.add_widget(self.chk) class CheckBoxApp(App): def build(self): return BasicCheckBox() if __name__ == '__main__': CheckBoxApp().run() OutputcheckboxExplanation:Label(text='Accept Terms', pos=(20,400)): creates the descriptive label.CheckBox(pos=(150,400), active=False): creates an unchecked checkbox.self.add_widget(...): adds widgets to the root widget.SyntaxCheckBox( active=False, )Key points:active: sets the initial state of the checkbox.You can attach a callback using bind(active=callback) to detect state changes.ExamplesExample 1: In this example, a checkbox updates a label and prints a message when checked or unchecked. Python from kivy.app import App from kivy.uix.checkbox import CheckBox from kivy.uix.label import Label from kivy.uix.widget import Widget class CallbackCheckBox(Widget): def __init__(self, **kwargs): super().__init__(**kwargs) self.lbl = Label(text='Checkbox is OFF', pos=(100, 250)) self.add_widget(self.lbl) self.chk = CheckBox(pos=(100, 200), active=False) self.chk.bind(active=self.on_checkbox_active) self.add_widget(self.chk) def on_checkbox_active(self, checkbox, value): if value: self.lbl.text = 'Checkbox is ON' print('Checkbox Checked') else: self.lbl.text = 'Checkbox is OFF' print('Checkbox Unchecked') class CheckBoxApp(App): def build(self): return CallbackCheckBox() if __name__ == '__main__': CheckBoxApp().run() OutputcheckboxExplanation:bind(active=self.on_checkbox_active): triggers the callback when the checkbox state changes.on_checkbox_active(): updates the label and prints the state.Example 2: This program shows three independent checkboxes with labels using only Label and CheckBox. Python from kivy.app import App from kivy.uix.checkbox import CheckBox from kivy.uix.label import Label from kivy.uix.widget import Widget class MultiCheckBox(Widget): def __init__(self, **kwargs): super().__init__(**kwargs) options = ['Option 1', 'Option 2', 'Option 3'] y = 300 for opt in options: lbl = Label(text=opt, pos=(100, y)) chk = CheckBox(pos=(250, y), active=False) self.add_widget(lbl) self.add_widget(chk) y -= 50 class CheckBoxApp(App): def build(self): return MultiCheckBox() if __name__ == '__main__': CheckBoxApp().run() OutputcheckboxExplanation:Loop over options to create labels and checkboxes.pos=(x,y): sets positions manually on the window.active=False: all checkboxes start unchecked.self.add_widget(...): adds labels and checkboxes to the widget. Create Quiz Comment Y YashKhandelwal8 Follow 9 Improve Y YashKhandelwal8 Follow 9 Improve Article Tags : Python Python-gui Python-kivy Explore Python FundamentalsPython Introduction 2 min read Input and Output in Python 4 min read Python Variables 4 min read Python Operators 4 min read Python Keywords 2 min read Python Data Types 8 min read Conditional Statements in Python 3 min read Loops in Python - For, While and Nested Loops 5 min read Python Functions 5 min read Recursion in Python 4 min read Python Lambda Functions 5 min read Python Data StructuresPython String 5 min read Python Lists 4 min read Python Tuples 4 min read Python Dictionary 3 min read Python Sets 6 min read Python Arrays 7 min read List Comprehension in Python 4 min read Advanced PythonPython OOP Concepts 11 min read Python Exception Handling 5 min read File Handling in Python 4 min read Python Database Tutorial 4 min read Python MongoDB Tutorial 3 min read Python MySQL 9 min read Python Packages 10 min read Python Modules 3 min read Python DSA Libraries 15 min read List of Python GUI Library and Packages 3 min read Data Science with PythonNumPy Tutorial - Python Library 3 min read Pandas Tutorial 4 min read Matplotlib Tutorial 5 min read Python Seaborn Tutorial 3 min read StatsModel Library - Tutorial 3 min read Learning Model Building in Scikit-learn 6 min read TensorFlow Tutorial 2 min read PyTorch Tutorial 6 min read Web Development with PythonFlask Tutorial 8 min read Django Tutorial | Learn Django Framework 7 min read Django ORM - Inserting, Updating & Deleting Data 4 min read Templating With Jinja2 in Flask 6 min read Django Templates 5 min read Build a REST API using Flask - Python 3 min read Building a Simple API with Django REST Framework 3 min read Python PracticePython Quiz 1 min read Python Coding Practice 1 min read Python Interview Questions and Answers 15+ min read Like