Git Product home page Git Product logo

uiavatars-npm's Introduction

UI Avatars

Generate avatar images based on user initials.

Build status Azure DevOps tests (branch) Azure DevOps coverage Codacy Badge MIT License npm

Usage

After installing, simply import it in your file.

const uiavatars = require("ui-avatars");

Consume the generateAvatar() API to get an avatar URL that you can use directly as an image. Supply the settings object to this method to generate the avatar image URL accordingly. You can either supply one or all settings, based on your requirement. All settings are pretty self-explanatory.

var avatarURL = uiavatars.generateAvatar({
            uppercase: true,
            name: "Tony Stark",
            background: "990000",
            color: "000000",
            fontsize: 0.5,
            bold: true,
            length: 2,
            rounded: true,
            size: 250
        }); 

Examples

Clicking on the images below opens the image in a browser window.

Sample image 1 Sample image 2 Sample image 3

Release notes

Release notes can be found here.

License

This npm package is licensed under MIT. UI Avatars may be licensed separately.

Credits

UI Avatars developed by Lasse Rafn / GitHub.
This npm package is developed by Clyde D'Souza.

uiavatars-npm's People

Contributors

clydedz avatar codacy-badger avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rhinoworks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.