Badge#

#

New in version 2.0.0.

Badges show notifications, counts, or status information on navigation items and icons.

https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/badges.png

Example#

from kivy.lang import Builder

from kivymd.app import MDApp

KV = '''
MDScreen:
    md_bg_color: self.theme_cls.backgroundColor

    MDIcon:
        icon: "gmail"
        pos_hint: {'center_x': .5, 'center_y': .5}

        MDBadge:
            text: "12"
'''


class Example(MDApp):
    def build(self):
        return Builder.load_string(KV)


Example().run()
https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/badges-example.png

API - kivymd.uix.badge.badge#

class kivymd.uix.badge.badge.MDBadge(*args, **kwargs)#

Badge class.

New in version 2.0.0.

For more information see in the MDLabel class documentation.