Kivy Widgets and Labels

In this Kivy tutorial, we're going to be discussing the notion of "labels" and "widgets." The idea of widgets is to have a handful of various types of elements, and then we can put them together for an application. Think of a home page with a login. You might have a home page that has some text that says something like "username" and "password." Then you will also need some text fields for input. To do this with Kivy, we'll use Label to have the text, then we're going to use a text input widget for letting the user actually type something.

After seeing how to add the username Label and the username text input field, we then can use an identical structure to create a Password Label, then text-input. Then we do it one more time for another field, this time for two-factor-authentication as an example.

Notice we also have another parameter in the password widget, which is this "password = True." Upon running, you will see that this parameter will convert the text input to asterisks, to mask the password to nosey-onlookers.