
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
react-ui-avatars
Advanced tools
Wrapper component for https://ui-avatars.com
Generate avatars from a users intials.
Credit to @LasseRafn for his awesome API.
https://codepen.io/novigradian/pen/qMwJgg
Using npm:
npm install react-ui-avatars
import ReactDOM from 'react-dom';
import React from 'react';
import UIAvatar from 'react-ui-avatars';
ReactDOM.render(
<UIAvatar name='Warren Zevon' color='#551a8b' />,
document.getElementById('#container')
);
Pass props same as specified at https://ui-avatars.com.
Example:
<UIAvatar name='Warren Zevon' size={128} />
Extra props are passed on to <img />
element.
Global settings for your app can be configured. The properties are the same as the props.
The global settings can be overriden on an individual instance of the component by passing the prop.
import ReactDOM from 'react-dom';
import React from 'react';
import UIAvatar from 'react-ui-avatars';
UIAvatar.settings = {
size: 128,
rounded: true
};
ReactDOM.render(
<UIAvatar name='Warren Zevon' />,
document.getElementById('#container')
);
FAQs
React component for ui-avatars.com
The npm package react-ui-avatars receives a total of 55 weekly downloads. As such, react-ui-avatars popularity was classified as not popular.
We found that react-ui-avatars demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.