Skip to main content

Avatar Upload

Upload an avatar by clicking on them.

Default avatar#

Set default avatar with defaultAvatar prop.

avatar
<>
<AvatarUpload defaultAvatar="https://erxes.io/static/images/logo/logo_dark_3x.png" />
</>

Avatar#

When you upload an avatar, it shows the avatar instead of default avatar.

avatar
<>
<AvatarUpload defaultAvatar="https://erxes.io/static/images/logo/logo_dark_3x.png" avatar="https://erxes.io/static/images/logo/glyph_dark.png" />
</>

API#

import AvatarUpload from "erxes-ui/lib/components/AvatarUpload";

* required prop

NameTypeDefaultDescription
defaultAvatarstringbuttonSet default avatar
avatarstringSet an avatar
onAvatarUpload*functionDefine function that changes the avatar when the image uploaded
Last updated on by enkhzule