1.0.0 • Published 7 months ago

@craydel-v3/craydel-avatar-with-details v1.0.0

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

CraydelAvatarWithDetails

Installation

Get the latest version by NPM:

$ npm i @craydel-v3/craydel-avatar-with-details

Component Import

Import the module chosen directly in your component

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

  export default {
  components: {CraydelAvatarWithDetails}
}
</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. This also sets the title of the avatar as part of the details.
acronymstringundefinedSets the avatar as an acronym.
textstringundefinedSets the text for the avatar as part of the details.
avatar-sizenumber | string40Sets the height and width of the avatar.
clickablebooleanfalseIf set, the component will be rendered as clickable that has @click handler.
densebooleanfalseReduces the height of the component.

Events

NameDescription
clickEvent that is emitted when the component is clicked.

Usage

An example showing an avatar that will display the name, initials and an email address.

<craydel-avatar-with-details
        display-name="John Doe"
        acronym="JD"
        text="john.doe@gmail.com"
></craydel-avatar-with-details>