Feedback Get up to 40% OFF using STAYATHOME coupon code | 0d 0h 0m 0s left

Avatar Element

An element used for profile images.



Name Type Description
url string The url to be prepended to the file's URI.
disabled boolean Whether the field is disabled.


Name Type Default Description
disabled boolean false Whether the field is disabled.
file object null The element's File object containing information about the uploaded file. Available properties: file, base64, preview, name, displayName, link.
url boolean null If the file is clickable this will be prepended to the file's URI.
defaultValue string null Value of element when the form is initially loaded or reseted.
lightbox$ object null Lightbox component which appears when the image is clicked.
originalName string - The original name of the uploaded file.


# .reset()

Resets the element to it's default state.

# .disable()

Disabled the field.

# .enable()

Enables the field.

# .change(File)

  • File File : Javascript file object

Changes the uploaded file and trigger it's change event.

# .set(File)

  • File object : Javascript File object.

Converts a javascript File object to element's File object and set it as the file property.

# .remove()

Removes the element's File object.


# preview

  • el$ object : The element component.
  • add function : Adds a new image.
  • remove function : Removes the image.
  • preview function : Opens image preview.

Contains the avatar preview.


# add

Triggered when a new file is selected by the user.

# remove

Triggered when the element's file is removed.