Initially start as a fork of https://github.com/sitebase/react-avatar to give the user the choice of priority of queue possibilities
Universal avatar makes it possible to fetch/generate an avatar based on the information you have about that user. We use a fallback system that if for example an invalid Facebook ID is used it will try Google, and so on.
For the moment we support following types:
- Skype
- Gravatar
- Name initials
- Custom text
- Custom image
The fallbacks are in the same order as the list you defined in props.priority.
priority: ['src', 'gravatar', 'facebook', 'google', 'skype', 'name', 'value'] // Default priority list
Install the component using NPM:
$ npm install react-avatr --save
-
Import Custom Element:
import Avatr from 'react-avatr';
-
Start using it!
<Avatr />
Some examples:
<Avatr size={100}
round={true}
email="[email protected]"
facebookId="131126510267471"
googleId="109698448540584893289"
src="http://placekitten.com/g/101/100"
name="Studio Frenetic"
value="SF"
priority={['facebook', 'google', 'gravatar', 'skype', 'src', 'name', 'value']}
/>