Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngletteravatar

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngletteravatar

directive for the letter avatar for the given string like gmail, first letter of the given data will be the avatar

  • 4.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
318
increased by15.64%
Maintainers
1
Weekly downloads
 
Created
Source

ng-letter-avatar Build Status

Gitter

AngularJS directive for simple data avatar like gmail/inbox. demo preview snaps :

demo demo demo demo demo demo demo demo demo demo

Quick start

bower install ngletteravatar or npm install ngletteravatar

or alternatively download and include ngletteravatar.js after angular.min.js. minified version ngletteravatar.min.js is under dist folder.

Add the ngLetterAvatar module as a dependency when creating your app, e.g.

var app = angular.module('myApp', ['ngLetterAvatar']);`

NO NEED TO INJECT in controller directly use in html.

Rendering

<p>
  <small>
     <ng-letter-avatar data="uttesh"></ng-letter-avatar>
  </small>
</p>

Option attirbutes

You can affect how letteravatar operates with the following settings:

namedefaultdescription
avatarcustombgcolorNo default valueUsing this attribute set the custom color for avatar background.
dynamicfalseSet this attribute to true if dynamically avatar needs to be generated on data change.
rotatedeg0Set this attribute required degrees of rotation of the avatar.
alphabetcolorsdefault color setUsing this attribute set the custom colors for the alphabets only.
charCount1Specifies the number of letters to displayed. to generate combined letter avatar of first name and last name which are separated by space then set the value to '2'
dataInput data i.e. email, names...etc -OR- If image already exists for item, set image URL or image data
height50pxset the height for the avatar
width50pxset the width for the avatar
fontWeight400set the font weight for the avatar
fontSize30pxset the font size for the letter
shapesquareset the shape for the avatar. set 'round' for rounded avatars
fontFamilyHelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica, Arial,Lucida Grande, sans-serifset the font Family of the avatar.
avatarborderfalseset the avatarborder to 'true' for the white border to avatar.
avatarcustomborderno default valueusing this attribute set the custom style to avatar borders i.e "border:5px solid black".

Contributions

For problems/suggestions please create an issue on Github.

Contributors

  • @uttesh

License

The MIT License

Copyright (c) 2015 Uttesh Kumar T.H. http://www.uttesh.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Package last updated on 09 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc