Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ember-initials

Exelord8.4kMIT4.0.1

Simple Initials Avatars for Ember applications

ember-addon, ember-initials, initials, avatars

readme

ember-initials

Ember Initials is a package for generating simple avatars using users initials, images, gravatars or adorables. It definitely supports Ember 3.16 (or higher). Thanks to highly customizable interface you can define defaults and even set fallbacks.

Demo App with code generators

Demo app with interactive examples you can find at http://exelord.github.io/ember-initials

Compatibility

  • Ember.js v3.16 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

This addon has been tested on:

  • IE 10 and UP including EDGE
  • Firefox 44 and UP
  • Chrome 48 and UP
  • Opera 35 and UP

Install

ember install ember-initials

Quick start

Ember Initials gives you a built-in components which you can use in yours templates:

Initials avatars:
<EmberInitials @name="John Doe" />

or

<EmberInitials::Initials @name="John Doe" />
Image avatars:
<EmberInitials::Image @image="/url/to/avatar.png" />
Gravatar avatars:
<EmberInitials::Gravatar @email="gravatar@email.com" />
Adorables avatars:
<EmberInitials::Adorable @email="email.to@generate.com" />

Examples, configuration and code generator are available on Project Site.

API Documentation

EmberInitials

<EmberInitials
  @image="images/user.jpg"
  @name="Ember Initials"
  @defaultName="?"
  @seedText="Ember Initials"
  @textColor="white"
  @fontSize=55
  @fontWeight=100
  @fontFamily="Helvetica Neue Light, Arial, sans-serif"
  @size=200
/>
  • image - image url | if image will be not found the initials avatars will be used

  • name - name of user to generate initials

  • defaultName - if name will be not passed this name will be used

  • seedText - uniq string which will be used to generate background color, eg. user's email

  • textColor - color of the text (initials) | hash or name

  • fontSize - font size in px

  • fontWeight - font weight in px

  • fontFamily - names of fonts with fallbacks | at this time only system fonts can be used

  • size - size of the avatar in pixels (set null if you do not want to use elements attributes like width and height)

EmberInitials::Image

<EmberInitials::Image
  @image="images/user.jpg"
  @size=200
  @defaultImage="images/default.jpg"
/>
  • image - image url | if image will be not found the defaultImage will be used

  • defaultImage - default image url

  • size - size of the avatar in pixels (set null if you do not want to use elements attributes like width and height)

EmberInitials::Gravatar

<EmberInitials::Gravatar
  @image="images/user.jpg"
  @email="example@example.com"
  @defaultImage="images/default.jpg"
  @relativeUrl="true"
  @size=200
/>
  • image - image url | if image will be not passed the avatar will be generated form email thanks to gravatar

  • email - Email which will be used to fetching the gravatar

  • defaultImage - image src (relative or absolute URL depends on relativeUrl option) | if gravatar will not be found this image will be used

  • relativeUrl - true or false | decide which defaultImage url do you want to use - relative or absolute

  • size - size of the avatar in pixels (set null if you do not want to use elements attributes like width and height)

EmberInitials::Adorable

<EmberInitials::Adorable
  @image="images/user.jpg"
  @email="email@user.com"
  @size=50
/>
  • image - image url | if image will be not found the avatar will be generated form email thanks to adorable

  • email - Email which will be used to generating unique adorable avatar

  • size - size of the avatar in pixels (set null if you do not want to use elements attributes like width and height)

changelog

Change Log

v3.13.0 (2018-07-04)

Full Changelog

Implemented enhancements:

Closed issues:

  • avatar using all width and height #65
  • Make alt text and title configurable #64
  • ember-initials is not a helper #58

v3.12.2 (2018-05-17)

Full Changelog

Merged pull requests:

v3.12.1 (2018-05-06)

Full Changelog

Closed issues:

  • Node.js Version Issues #60

Merged pull requests:

v3.12.0 (2018-05-01)

Full Changelog

Implemented enhancements:

Closed issues:

  • Build Canceled: Broccoli Builder ran into an error with Concat plugin #55

v3.11.1 (2018-03-21)

Full Changelog

Closed issues:

  • md5 issue with fresh install #56

Merged pull requests:

v3.11.0 (2018-02-18)

Full Changelog

Implemented enhancements:

v3.10.0 (2018-02-18)

Full Changelog

Implemented enhancements:

v3.9.0 (2018-02-05)

Full Changelog

Implemented enhancements:

v3.8.0 (2018-02-04)

Full Changelog

Implemented enhancements:

v3.7.0 (2018-01-19)

Full Changelog

Implemented enhancements:

Fixed bugs:

  • Newest release fails in fastboot #42
  • Allow to override colors and styles #50 (Exelord)

Closed issues:

  • Cannot read property 'initialsFor' of undefined #46

v3.6.1 (2018-01-05)

Full Changelog

Implemented enhancements:

  • Initialize cache store only when used #49 (Exelord)

Fixed bugs:

v3.6.0 (2017-12-26)

Full Changelog

Implemented enhancements:

v3.5.0 (2017-12-26)

Full Changelog

Implemented enhancements:

v3.4.0 (2017-11-27)

Full Changelog

Implemented enhancements:

Closed issues:

  • how to generate round avatar #38
  • Test failures when setting a value on a destroyed initials mixin. #36

v3.3.0 (2017-06-27)

Full Changelog

Implemented enhancements:

Fixed bugs:

  • Fix breaking changes in FastBoot 1.0 #34
  • Upgrade packages #35 (Exelord)
  • Fix potential problem with ember assign #33 (Exelord)

Closed issues:

  • could not install #32

v3.2.1 (2017-05-01)

Full Changelog

v3.2.0 (2017-05-01)

Full Changelog

Implemented enhancements:

Closed issues:

  • Seeing 404's for image blobs, can't figure out why -- in Chrome, not Firefox *hrmph* #29

v3.1.0 (2017-04-08)

Full Changelog

Implemented enhancements:

Closed issues:

  • MD5 stuff breaking new projects #25
  • Can't seem to upgrade from 2.4.0 to 3.0.0 #22

Merged pull requests:

v3.0.3 (2017-03-17)

Full Changelog

v3.0.1 (2017-03-15)

Full Changelog

Fixed bugs:

Closed issues:

  • Is it possible to SPECIFY a background color for any usage of initials? #23
  • Support for users images #20
  • Support for gravatars #19

v3.0.0 (2017-03-13)

Full Changelog

Implemented enhancements:

  • Avatars as Images, Gravatars, Initials and adorables... 4 in 1 #21 (Exelord)
  • Improve priavte api #17 (Exelord)

Closed issues:

  • Helper can't be found #15
  • What is the browser support for your addon? #14

Merged pull requests:

v2.4.0 (2017-02-26)

Full Changelog

Implemented enhancements:

v2.3.1 (2017-02-26)

Full Changelog

v2.3.0 (2017-02-23)

Full Changelog

Implemented enhancements:

v2.2.0 (2017-01-06)

Full Changelog

Implemented enhancements:

Fixed bugs:

v2.1.1 (2016-12-26)

Full Changelog

Fixed bugs:

v2.1.0 (2016-12-18)

Full Changelog

Fixed bugs:

  • [Bug] Removing name and default name in demo page causes "Uncaught TypeError: Cannot read property 'toUpperCase' of undefined" error #4
  • Fix letter capitalizer #5 (Exelord)

Merged pull requests:

v2.0.3 (2016-11-26)

Full Changelog

Fixed bugs:

v2.0.2 (2016-11-25)

Full Changelog

v2.0.1 (2016-11-21)

Full Changelog

v2.0.0 (2016-11-21)

Merged pull requests:

* This Change Log was automatically generated by github_changelog_generator