Note: Application logic should not interact with the component's properties or invoke its methods until the BusyContext indicates that the component is ready for interaction.
Attributes
-
background :"neutral"|"red"|"orange"|"forest"|"green"|"teal"|"mauve"|"purple"
-
Specifies the background of the avatar.
- Default Value:
"neutral"
Supported Values:
Value Description "neutral"Neutral background (default, if unspecified) "red"Red background "orange"Orange background "forest"Forest background "green"Green background "teal"Teal background "mauve"Mauve background "purple"Purple background Names
Item Name Property backgroundProperty change event backgroundChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-background-changed -
initials :string
-
Specifies the initials of the avatar. Will only be displayed if the src attribute is null. Required if src attribute is provided for accessibility purposes. Will be displayed if the src attribute is not specified, or in high contrast mode for accessibility purposes.
- Default Value:
null
Names
Item Name Property initialsProperty change event initialsChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-initials-changed -
size :"xxs"|"xs"|"sm"|"md"|"lg"|"xl"|"xxl"
-
Specifies the size of the avatar.
- Default Value:
"md"
Supported Values:
Value Description "xxs"extra, extra small avatar "xs"extra small avatar "sm"small avatar "md"medium avatar (default, if unspecified) "lg"large avatar "xl"extra large avatar "xxl"extra, extra large avatar Names
Item Name Property sizeProperty change event sizeChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-size-changed -
src :string
-
Specifies the src for the image of the avatar. Image will be rendered as a background image. In high contrast mode, initials will be displayed instead since background images will not be rendered.
- Default Value:
null
Names
Item Name Property srcProperty change event srcChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-src-changed
Methods
-
getProperty(property) : {any}
-
Retrieves a value for a property or a single subproperty for complex properties.
Parameters:
Name Type Description propertystring The property name to get. Supports dot notation for subproperty access. Returns:
- Type
- any
-
setProperties(properties) : {void}
-
Performs a batch set of properties.
Parameters:
Name Type Description propertiesObject An object containing the property and value pairs to set. Returns:
- Type
- void
-
setProperty(property, value) : {void}
-
Sets a property or a single subproperty for complex properties and notifies the component of the change, triggering a [property]Changed event.
Parameters:
Name Type Description propertystring The property name to set. Supports dot notation for subproperty access. valueany The new value to set the property to. Returns:
- Type
- void