image class
A control that can display an image.
Methods¶
__init__() ¶
__init__(
content=None,
label=None,
on_action=None,
width="300px",
height=None,
active=True,
id=None,
properties=None,
class_name=None,
hover_text=None,
) -> None
Create a new image element.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
content
|
dynamic(Union[path, URL, file, ReadableBuffer])
|
The image source.
|
None
|
label
|
dynamic(str)
|
The label for this image. |
None
|
on_action
|
Union[str, Callable]
|
A function or the name of a function that is triggered when the user clicks on the image.
|
None
|
width
|
Union[str, int, float]
|
The width of the image control, in CSS units. |
300px
|
height
|
Union[str, int, float]
|
The height of the image control, in CSS units. |
None
|
active
|
dynamic(bool)
|
Indicates if this element is active. |
True
|
id
|
str
|
The identifier assigned to the rendered HTML component. |
None
|
properties
|
dict[str, Any]
|
A dictionary of additional properties that can be set to the element. |
None
|
class_name
|
dynamic(str)
|
A space-separated list of CSS class names to be applied to the generated HTML element. |
None
|
hover_text
|
dynamic(str)
|
The text that is displayed when the user hovers over the element. |
None
|