
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@jakxz/react-user-avatar
Advanced tools
React component for a user avatar with fallback to colored initials
A bare-bones user avatar display with support for falling back to using the user's initials on a colored background as the avatar.

npm install -S react-user-avatar
<UserAvatar size="48" name="Will Binns-Smith" />
<UserAvatar size="48" name="Will Binns-Smith" src="https://pbs.twimg.com/profile_images/429442426038538240/6Ac9kykG_400x400.jpeg" />
<UserAvatar size="48" name="John Doe" colors={['#ccc', '#fafafa', '#ccaabb']}/>
<UserAvatar size="48" name="Mary Ann Gilligans" />
<UserAvatar size="48" name="Jane Doe" color="#FFF" />
<UserAvatar size="48" name="Madonna" />
This module uses react-style inline styles to narrow the api, yet allows for reasonable extensibility by exposing
a number of DOM classes. Take a look (or simply use) example.css for ideas.
The fallback avatar's color may be set by passing in the color prop, or you can customize the range of colors
used by passing in an array of colors. The component uses a simple calculation to consistently use the same
color for the same user's name every time.
If the component determines that the color chosen was visually light, it will apply a UserAvatar--light class to the root element.
If the color chosen was dark, it will apply UserAvatar--dark. Take advantage of these to use the appropriately colored text or border
when styling the component.
FAQs
React component for a user avatar with fallback to colored initials
The npm package @jakxz/react-user-avatar receives a total of 10 weekly downloads. As such, @jakxz/react-user-avatar popularity was classified as not popular.
We found that @jakxz/react-user-avatar 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
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.