avatar-elements
avatar-elements copied to clipboard
Under construction :construction: Avatars made easy with Web Components
<avatar-elements>
Avatars made easy with Web Components.
Roadmap
This project is under construction, but you can check our high level goals.
- [X] GitHub
- [X] Facebook
- [X] Skype
- [X] Twitter
- [X] Instagram
- [X] Gravatar
Demo
Install
Install the component using Bower:
$ bower install avatar-elements --save
Or download as ZIP.
Usage
-
Import Custom Elements' polyfill:
<script src="bower_components/webcomponentsjs/CustomElements.min.js"></script>
-
Import Custom Elements:
<script src="dist/avatars.js"></script>
-
Start using it!
<img is="avatar-github" username="zenorocha">
avatar-github
Options
Attribute | Options | Default | Description |
---|---|---|---|
username |
string | null |
Required. The name of the user. |
size |
number | 48 |
Custom image dimensions. |
Development
In order to run it locally you'll need to fetch some dependencies.
-
$ [sudo] npm install -g bower gulp
-
Install local dependencies:
$ bower install && npm install
-
To watch ES6 compilation and start the development server.
$ gulp
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
History
For detailed changelog, check Releases.
Credits
Inspired by Phil Leggetter and avatars.io.
License
MIT License © Zeno Rocha