Icons
Introduction
In this tutorial you will learn how to use Icons widget in Supervisely app.
Function signature
Icons(class_name=None, color=None, bg_color=None, rounded=False, image_url=None, widget_id=None)
Parameters
class_name
str
Icon class name (e.g "zmdi zmdi-image-o")
color
str
Icon color
bg_color
str
Icon background color
rounded
bool
Round icon
image_url
str
Icon image url
widget_id
str
Id of the widget
class_name
Determines icon class name. Icons can be found at zavoloklom.github.io.
type: str
default value: None

color
Determines icon color.
type: str
default value: None

bg_color
Determines icon background color.
type: str
default value: None

rounded
Round icon.
type: bool
default value: False

image_url
Icon image url.
type: str
default value: None

widget_id
ID of the widget.
type: str
default value: None
Methods and attributes
set_class_name(value: str)
Set Icons class name.
get_class_name()
Return Icons class name.
set_color(value: str)
Set Icons color.
get_color()
Return Icons color.
set_bg_color(value: str)
Set Icons background color.
get_bg_color()
Return Icons background color.
set_rounded()
Set Icons round.
set_standart()
Set Icons standart.
get_rouded()
Check Icons round or not.
set_image_url(value: str)
Set Icons image url.
get_image_url()
Return Icons image url.
Mini App Example
You can find this example in our Github repository:
supervisely-ecosystem/ui-widgets-demos/media/008_icons/src/main.py
Import libraries
Initialize Button we will use
Button we will useInitialize Icons widget
Icons widgetCreate 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 widget from python code

Last updated
Was this helpful?