sepal_ui.sepalwidgets.alert.Banner#
- class sepal_ui.sepalwidgets.alert.Banner(**kwargs)[source]#
Custom Snackbar widget to display messages as a banner in module App.
- Parameters:
msg (str) – Message to display in application banner. default to nothing
type_ (str) – Used to display an appropriate banner color. fallback to “info”.
id – unique banner identificator.
persistent (bool) – Whether to close automatically based on the length of message (False) or make it indefinitely open (True). Overridden if timeout duration is set.
kwargs (optional) – any parameter from a v.Alert. If set, ‘vertical’ and ‘top’ will be overwritten.
id_ (str)
Attributes
btn_close
the closing btn of the banner
Methods
Custom Snackbar widget to display messages as a banner in module App.
Close button event to close snackbar alert.
Calculate timeout in milliseconds to read the message.
Change the btn display to inform the user on the number of banners in the queue.
- Banner.__init__(msg='', type_='info', id_='', persistent=True, **kwargs)[source]#
Custom Snackbar widget to display messages as a banner in module App.
- Parameters:
msg (str) – Message to display in application banner. default to nothing
type_ (str) – Used to display an appropriate banner color. fallback to “info”.
id – unique banner identificator.
persistent (bool) – Whether to close automatically based on the length of message (False) or make it indefinitely open (True). Overridden if timeout duration is set.
kwargs (optional) – any parameter from a v.Alert. If set, ‘vertical’ and ‘top’ will be overwritten.
id_ (str)
- Return type:
None