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)
icons_default

Parameters

Parameters
Type
Description

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

class_name

color

Determines icon color.

type: str

default value: None

color

bg_color

Determines icon background color.

type: str

default value: None

bg_color

rounded

Round icon.

type: bool

default value: False

rounded

image_url

Icon image url.

type: str

default value: None

image_url

widget_id

ID of the widget.

type: str

default value: None

Methods and attributes

Attributes and Methods
Description

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

Initialize Icons widget

Create 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

layout

Last updated

Was this helpful?