ElementTagsList
Last updated
Last updated
ElementTagsList
widget in Supervisely is a widget that allows users to display multiple elements tags in the UI.
tags
List[ElementTagsList.Tag]
List of ElementTagsList.Tag
objects
widget_id
str
ID of the widget
List of ElementTagsList.Tag
objects, that will be displayed in the UI. ElementTagsList.Tag
object is based on ElementTag
widget and has the same arguments. You can learn about them in the ElementTag tutorial.
If you want to add close button to the tag, you can use ElementTagsList.Tag
object with closable=True
argument.
type: List[ElementTagsList.Tag]
ID of the widget
type: str
default value: None
set_tags()
Set tags to widget
get_tags()
Get current tags
add_tags()
Add tags to existing tags in the widget
close()
Triggers on close button
You can find this example in our Github repository:
supervisely-ecosystem/ui-widgets-demos/text elements/009_element_tags_list/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Prepare a layout for app using Card
widget with the content
parameter.
Create an app object with layout parameter.