Skip to content

Angular CLI easy letter avatar generator library

Notifications You must be signed in to change notification settings

cemezgin/ngx-letter-avatar

Repository files navigation

ngX Letter Avatar

ngX Letter Avatar is a library for generate letter avatars easily.

Install from npm

npm install ngx-letter-avatar

Your Endpoint object should be like this.

person: {
    avatar: {
        url: 'http://www.youravatarurl.com'
    }
    firstName: 'Cem',
    lastName: 'Ezgin,
    // OR
    fullName: 'Cem Ezgin'
}

If the avatar object is null letter avatar is going to generated. You can take first and last name seperate or together.

Usage of component in html

<letter-avatar person='{{person | json}}'></letter-avatar>

Modify shape properties in scss

 .shape-avatar {
    width: 55px;
    height:55px;
    border-radius: 50%;
       .letter-avatar {
          padding-top: 18px;
          font-size: 15px;
       }
  }

About

Angular CLI easy letter avatar generator library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published