taipy.gui.Icon
Small image in the User Interface.
Icons are typically used in controls like button or items in a menu.
Attributes:
Name | Type | Description |
---|---|---|
path |
str
|
The path to the image file. |
text |
Optional[str]
|
The text associated to the image or None if there is none. |
svg |
Optional[bool]
|
True if the image is svg. |
If a text is associated to an icon, it is rendered by the visual elements that uses this Icon.
__init__(path, text=None, light_path=None, dark_path=None)
¶
Initialize a new Icon.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
The path to an image file. |
required |
text |
Optional[str]
|
The text associated to the image. If text is None, there is no text associated to this image. |
None
|
light_path |
Optional[str]
|
The path to the light theme image (fallback to path if not defined). |
None
|
dark_path |
Optional[str]
|
The path to the dark theme image (fallback to path if not defined). |
None
|