项目作者: enniob

项目描述 :
User initials avatar
高级语言: TypeScript
项目地址: git://github.com/enniob/ngx-eb-avatar.git
创建时间: 2018-11-12T15:27:21Z
项目社区:https://github.com/enniob/ngx-eb-avatar

开源协议:MIT License

下载


npm version

ngx-eb-avatar

ngx-eb-avatar is a lightweight avatar generator component.

Demo

Check out the link for a live demo.

Install

  1. npm install --save ngx-eb-avatar

Usage

Import the main moduel:

  1. import { NgxEbAvatarModule } from 'ngx-eb-avatar';

Add the following to your template:

  1. <ngx-eb-avatar name="Your Name"
  2. [shadow]="true"
  3. width="50"
  4. height="50"
  5. bgColor="337ab7"
  6. fontColor="FFFFFF">
  7. </ngx-eb-avatar>

Configuration

option type
name string
shadow boolean
width number
height number
bgColor string
fontColor string

bgColor and fontColor use HTML Hex color codes with the # sign.