npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ember-initials

v4.0.1

Published

Simple Initials Avatars for Ember applications

Downloads

7,192

Readme

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="[email protected]" />
Adorables avatars:
<EmberInitials::Adorable @email="[email protected]" />

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="[email protected]"
  @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 protected]"
  @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)