Tabs
Introduction
Tabs
is a graphical user interface tool in Supervisely that allows users to group related widgets into multiple tabs, providing a more organized and streamlined interface. Each tab contains a set of widgets specific to a particular task or category.
Function signature
Parameters
Parameters | Type | Description |
---|---|---|
|
| List of the tabs labels |
|
| List of tabs content |
|
| Style of |
|
| ID of the widget |
labels
Determine list of the tabs labels.
type: List[str]
contents
Determine list of the tabs content.
type: List[Widget]
type
Determine style of Tabs
widget.
type: Optional[Literal["card", "border-card"]]
default value: "border-card"
widget_id
ID of the widget.
type: str
default value: None
Methods and attributes
Attributes and Methods | Description |
---|---|
| Set active tab by title. |
| Return active tab title. |
| Decorator for setting a callback function for the |
Mini App Example
You can find this example in our Github repository:
ui-widgets-demos/layouts and containers/012_tabs/src/main.py
Import libraries
Init API client
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Initialize Tabs
widgets
Tabs
widgetsInitialize Text
and Button
widgets
Text
and Button
widgetsCreate app layout
Prepare a layout for app using Card
widget with the content
parameter and place widget that we've just created in the Container
widget.
Create app using layout
Create an app object with layout parameter.
Add functions to control widgets from python code
Last updated