kivymd.snackbar module

Snackbar

Material Design spec page

API

class kivymd.snackbar.Snackbar(text, button_text=None, button_callback=None, duration=None)

Bases: kivy._event.EventDispatcher

A Material Design Snackbar

text

The text that will appear in the Snackbar.

text is a StringProperty and defaults to ”.

button_text

The text that will appear in the Snackbar’s button.

Note

If this variable is None, the Snackbar will have no button.

button_text is a StringProperty and defaults to None.

button_callback

The callback that will be triggered when the Snackbar’s button is pressed.

Note

If this variable is None, the Snackbar will have no button.

button_callback is a ObjectProperty and defaults to None.

duration

The amount of time that the Snackbar will stay on screen for.

duration is a NumericProperty and defaults to 3.

show()

Show the Snackbar