Package Exports
- ui-avatars
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ui-avatars) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
UI Avatars
Generate avatar images based on user initials.
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.
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.