ElementTag
Introduction
ElementTag
widget in Supervisely is a widget that allows users to display elements tag in the UI.
Function signature
Parameters
Parameters | Type | Description |
---|---|---|
|
|
|
|
|
|
|
| Whether |
|
| Background color of the |
|
| ID of the widget |
text
Determine ElementTag
text.
type: str
type
Determine ElementTag
theme.
type: Literal["primary", "gray", "success", "warning", "danger", None]
default value: None
hit
Determine whether ElementTag
has a highlighted border.
type: bool
default value: False
color
Determine background color of the ElementTag
.
type: str
default value: ""
widget_id
ID of the widget
type: str
default value: None
Methods and attributes
Attributes and Methods | Description |
---|---|
| Set |
| Return |
| Set |
| Return |
| Set |
| Get |
| Return |
| Set |
Mini App Example
You can find this example in our Github repository:
supervisely-ecosystem/ui-widgets-demos/text elements/008_element_tag/src/main.py
Import libraries
Init API client
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Initialize ElementTag
widgets
ElementTag
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.
Last updated