Skip to content

ElementProperty class

The declaration of a property of a visual element.

Each visual element property is described by an instance of ElementProperty. This class holds the information on the name, type and default value for the element property.

Methods

__init__()

__init__(
    property_type: t.Union[
        PropertyType, t.Type[_TaipyBase]
    ],
    default_value: t.Optional[t.Any] = None,
    js_name: t.Optional[str] = None,
    with_update: t.Optional[bool] = None,
) -> None

Initializes a new custom property declaration for an Element.

Parameters:

Name Type Description Default
property_type PropertyType

The type of this property.

required
default_value Optional[Any]

The default value for this property. Default is None.

None
js_name Optional[str]

The name of this property, in the front-end JavaScript code.
If unspecified, a camel case version of name is generated: for example, if name is "my_property_name", then this property is referred to as "myPropertyName" in the JavaScript code.

None