@craydel-v3/craydel-avatar

1.0.0 • Public • Published

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

Name Type Default Description
photo string undefined Sets the avatar as an image.
display-name string undefined Generates a random color that is applied to the avatar based on the display-name.
acronym string undefined Sets the avatar as an acronym. Only visible when photo is not provided.
size number | string 40 Sets 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>

Package Sidebar

Install

npm i @craydel-v3/craydel-avatar

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

5.49 kB

Total Files

5

Last publish

Collaborators

  • sayedwasim