sepal_ui.sepalwidgets.app.App#
- class sepal_ui.sepalwidgets.app.App(**kwargs)[source]#
Custom App display with the tiles created by the user using the sepal color framework.
Display false appBar if not filled. Navdrawer is fully optional. The drawerItem will be linked to the app tile and they will be able to control their display If the navdrawer exist, it will be linked to the appbar togglebtn.
- Parameters:
tiles (List[Card]) – the tiles of the app
appBar (AppBar | None) – the appBar of the application
footer (Footer | None) – the footer of the application
navDrawer (NavDrawer | None) – the navdrawer of the application
translator (Translator | None) – the translator of the app to display language information
kwargs (optional)
Attributes
appBar
the AppBar of the application
content
the tiles organized in a fluid container
footer
the footer of the application
navDrawer
the navdrawer of the application
tiles
the tiles of the app
Methods
Custom App display with the tiles created by the user using the sepal color framework.
Display a snackbar object on top of the app.
Select the tile to display when the app is launched.
- App.__init__(tiles=[], appBar=None, footer=None, navDrawer=None, translator=None, **kwargs)[source]#
Custom App display with the tiles created by the user using the sepal color framework.
Display false appBar if not filled. Navdrawer is fully optional. The drawerItem will be linked to the app tile and they will be able to control their display If the navdrawer exist, it will be linked to the appbar togglebtn.
- Parameters:
tiles (List[Card]) – the tiles of the app
appBar (AppBar | None) – the appBar of the application
footer (Footer | None) – the footer of the application
navDrawer (NavDrawer | None) – the navdrawer of the application
translator (Translator | None) – the translator of the app to display language information
kwargs (optional)
- Return type:
None
- App.add_banner(msg='', type_='info', id_=None, persistent=True, **kwargs)[source]#
Display a snackbar object on top of the app.
Used to communicate development information to end user (release date, known issues, beta version). The alert is dissmisable and prominent.
- 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 – any arguments of the sw.Banner constructor. if set, ‘children’ will be overwritten.
- Return type:
Self
Changed in version 2.7.1: new id_ and persistent parameters
New in version 2.4.1: New end user interaction method