avatar-elements icon indicating copy to clipboard operation
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

Check it live!

Install

Install the component using Bower:

$ bower install avatar-elements --save

Or download as ZIP.

Usage

  1. Import Custom Elements' polyfill:

    <script src="bower_components/webcomponentsjs/CustomElements.min.js"></script>
    
  2. Import Custom Elements:

    <script src="dist/avatars.js"></script>
    
  3. 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.

  • Install Bower & Gulp:

    $ [sudo] npm install -g bower gulp
    
  • Install local dependencies:

    $ bower install && npm install
    
  • To watch ES6 compilation and start the development server.

    $ gulp
    

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

For detailed changelog, check Releases.

Credits

Inspired by Phil Leggetter and avatars.io.

License

MIT License © Zeno Rocha