1.0.0 • Published 7 months ago

@craydel-v3/craydel-avatar v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

CraydelAvatar

Installation

Get the latest version by NPM:

$ npm i @craydel-v3/craydel-avatar

Component Import

Import the module chosen directly in your component

<script>
  import CraydelAvatar from "@craydel-v3/craydel-avatar/src/CraydelAvatar.vue";

  export default {
  components: {CraydelAvatar}
}
</script>

Props

NameTypeDefaultDescription
photostringundefinedSets the avatar as an image.
display-namestringundefinedGenerates a random color that is applied to the avatar based on the display-name.
acronymstringundefinedSets the avatar as an acronym. Only visible when photo is not provided.
sizenumber | string40Sets the height and width of the component.

Usage

An example showing an avatar that will display the initials 'JD'.

<craydel-avatar
        display-name="John Doe"
        acronym="JD"
></craydel-avatar>