Gathering detailed insights and metrics for react-string-avatar
Gathering detailed insights and metrics for react-string-avatar
react-string-avatar is a simple React.js component that generates a letter's avatar like Microsoft or Google do in their web apps. First letter of each word in a string or a group of initials will be used to generate the avatar. The image of the avatar will be rendered in an html img tag as a real png or jpeg.
npm install react-string-avatar
Typescript
Module System
Node Version
NPM Version
66.6
Supply Chain
92.3
Quality
75.3
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
28,923
Last Day
12
Last Week
113
Last Month
488
Last Year
3,620
MIT License
3 Stars
124 Commits
1 Forks
2 Watchers
19 Branches
2 Contributors
Updated on Feb 02, 2025
Minified
Minified + Gzipped
Latest Version
1.2.2
Package Id
react-string-avatar@1.2.2
Unpacked Size
27.97 kB
Size
8.13 kB
File Count
6
NPM Version
6.9.0
Node Version
10.15.1
Cumulative downloads
Total Downloads
Last Day
-33.3%
12
Compared to previous day
Last Week
-8.1%
113
Compared to previous week
Last Month
21.4%
488
Compared to previous month
Last Year
-70.8%
3,620
Compared to previous year
25
React String Avatar is an ES6 module/component for React that generates a letter's avatar like Microsoft or Google do in their web apps. First letter of each word in a string or a group of initials will be used to generate the avatar. The image of the avatar will be rendered in an html img tag as a real png or jpeg. The image data can be retrieved using javascript to be stored in back-end giving you an initial profile picture in your web or mobile apps when the user does not upload one. Several React props are available to configure the output: size, shape, resolution, colors, etc.
Live example here: https://www.subidote.com/react-string-avatar/?path=/story/avatar--my-avatar-1
From npm
1npm install react-string-avatar --save
or yarn
1yarn add react-string-avatar --save
Source in github: https://github.com/ajsoriar/react-string-avatar
1import Avatar from 'react-string-avatar';
1<Avatar initials="A"></Avatar>
You will get this:
1<Avatar initials="A" /> 2<Avatar initials="AS" bgColor="#00FF00" /> 3<Avatar initials="AJS" bgColor="cyan" textColor="blue" roundShape="true" ></Avatar> 4<Avatar initials="AJ" bgColor="red" textColor="yellow" pictureResolution={512} width={64} /> 5<Avatar initials="AJ" bgColor="yellow" textColor="green" pictureResolution={1024} width={32} /> 6<Avatar initials="AS" bgColor="lightgreen" textColor="red" pictureResolution={16} width={128} pixelated={false} /> 7<Avatar initials="AS" bgColor="#99f499" textColor="red" pictureResolution={16} width={128} pixelated /> 8<Avatar initials="AS" roundShape bgColor="#a8ff2c" textColor="black" pictureResolution={512} width={42} pixelated={false} class="adres-css" wrapperStyle={{ border: '4px solid red' }} wrapper /> 9<Avatar initials="123" roundShape string=" andres jose soria " bgColor="orange" textColor="#FFF" pictureResolution={256} width={64} pixelated={false} class="adres-css" wrapperStyle={{ border: '4px solid red' }} /> 10<Avatar roundShape bgColor="#36adf2" textColor="white" pictureResolution={256} width={56} pixelated={false} class="adres-css" wrapperStyle={{ border: '2px solid blue' }} /> 11<Avatar initials="CM" cornerRadius={7} bgColor="#3875d7" /> 12<Avatar initials="jpg" pictureFormat="jpeg" bgColor="red" textColor="yellow" width={64} cornerRadius={5} /> 13<Avatar initials="png" pictureFormat="png" bgColor="purple" textColor="yellow" width={64} cornerRadius={5} />
You will get this:
1<Avatar string="Foo Bar" autoColor={true} />
Clone this repository, install dependencies and launch storybook.
1git clone https://github.com/ajsoriar/react-string-avatar.git 2 3yarn install 4 5yarn storybook 6 7yarn build
react-string-avatar is MIT licensed.
Free Software, Yeah!
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/20 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
102 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-24
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More