ElementTag
Last updated
Last updated
ElementTag
widget in Supervisely is a widget that allows users to display elements tag in the UI.
text
str
ElementTag
text
type
Literal["primary", "gray", "success", "warning", "danger", None]
ElementTag
theme
hit
bool
Whether ElementTag
has a highlighted border
color
str
Background color of the ElementTag
widget_id
str
ID of the widget
Determine ElementTag
text.
type: str
Determine ElementTag
theme.
type: Literal["primary", "gray", "success", "warning", "danger", None]
default value: None
Determine whether ElementTag
has a highlighted border.
type: bool
default value: False
Determine background color of the ElementTag
.
type: str
default value: ""
ID of the widget
type: str
default value: None
set_text(value: str)
Set ElementTag
text.
get_text()
Return ElementTag
text.
set_type()
Set ElementTag
type.
get_type()
Return ElementTag
type.
set_hit()
Set ElementTag
hit
value.
get_hit()
Get hit
value.
get_color()
Return ElementTag
color.
set_color(value: str)
Set ElementTag
color.
You can find this example in our Github repository:
supervisely-ecosystem/ui-widgets-demos/text elements/008_element_tag/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
ElementTag
widgetsPrepare a layout for app using Card
widget with the content
parameter and place widget that we've just created in the Container
widget.
Create an app object with layout parameter.