In this video I’ll show you how to add tabs to your Kivy app.

Tabs are a really common design element in Graphical User Interfaces and Kivy makes using them really easy. In this video I’ll show you how to add tabs to your app, how to put things in the tabs, how to size the tabs, and how to position the tabs themselves (on top, bottom, left, or right).

Tabs are a great way to break apart the different elements of your GUI, and Kivy makes it pretty easy to use them.

Python Code:
GitHub Code:

from import App
from kivy.uix.widget import Widget
from import ObjectProperty
from kivy.lang import Builder
from kivy.uix.tabbedpanel import TabbedPanel

# Designate Our .kv design file 

class MyLayout(TabbedPanel):

class AwesomeApp(App):
	def build(self):
		return MyLayout()

if __name__ == '__main__':

Kivy Design Code: tabs.kv
GitHub Code: tabs.kv

	do_default_tab: False

	size_hint: .5, .5
	pos_hint: {'center_x': .5, 'center_y': .5}

        # ft_top, left_mid, left_bottom, top_left, 
        # top_mid, top_right, right_top, right_mid, 
        # right_bottom, bottom_left, bottom_mid, 
        # bottom_right.
	tab_pos: 'left_top'

		text: "Tab 1"
			text: "Hello World!"

		text: "Tab 2"
				text: "Press The Button =>"
				text: "Click Me!!"

		text: "Tab 3"

			source: "images/aspen1.jpg"


John Elder

John is the CEO of where he teaches over 100,000 students how to code! He founded one of the Internet's earliest advertising networks and sold it to a publicly company at the height of the first dot com boom. After that he developed the award-winning Submission-Spider search engine submission software that's been used by over 3 million individuals, businesses, and governments in over 42 countries. He's written several Amazon #1 best selling books on coding, and runs a popular Youtube coding channel.

View all posts

Add comment

Your email address will not be published. Required fields are marked *

John Elder