Gathering detailed insights and metrics for @chakra-ui/c-avatar
Gathering detailed insights and metrics for @chakra-ui/c-avatar
npm install @chakra-ui/c-avatar
Typescript
Module System
Node Version
NPM Version
54.2
Supply Chain
56.6
Quality
77.2
Maintenance
100
Vulnerability
98.2
License
@chakra-ui/vue-next@2.1.0-beta.11
Published on 28 Mar 2023
@chakra-ui/vue-next@2.1.0-beta.10
Published on 28 Mar 2023
@chakra-ui/vue-next@2.1.0-beta.8
Published on 21 Mar 2023
@chakra-ui/vue-next@2.1.0-beta.7
Published on 14 Mar 2023
@chakra-ui/vue-next@2.1.0-beta.6
Published on 12 Mar 2023
@chakra-ui/vue-next@2.1.0-beta.5
Published on 12 Mar 2023
TypeScript (81.11%)
Vue (17.15%)
JavaScript (0.74%)
EJS (0.74%)
HTML (0.27%)
Total Downloads
21,287
Last Day
19
Last Week
60
Last Month
205
Last Year
2,181
261 Stars
1,381 Commits
33 Forks
11 Watching
80 Branches
16 Contributors
Latest Version
0.0.0-alpha.3
Package Id
@chakra-ui/c-avatar@0.0.0-alpha.3
Unpacked Size
50.57 kB
Size
6.95 kB
File Count
17
NPM Version
8.11.0
Node Version
16.16.0
Cumulative downloads
Total Downloads
Last day
90%
19
Compared to previous day
Last week
140%
60
Compared to previous week
Last month
65.3%
205
Compared to previous month
Last year
-88.3%
2,181
Compared to previous year
5
1
1
The avatar component is used to represent user and displays the profile picture initials or fallback icon
1yarn add @chakra-ui/c-avatar 2# or 3npm i @chakra-ui/c-avatar
This packages exports the following components:
1<c-avatar 2 name="Evan You" 3 alt="Evan You" 4 src="https://www.github.com/yyx990803.png" />
The avatar component comes in 7 different sizes (2xs
|xs
| sm
| md
| lg
| xl
| 2xl
) :
1<c-avatar 2 name="Evan You" 3 alt="Evan You" 4 src="https://www.github.com/yyx990803.png" 5 size="sm"/> 6
If there is an error loading the src
of the avatar, there are 2 fallbacks :
name
prop, we use it to generate the initials and a random, accessible background color.name
prop, we use a default Avatar.You can customize the fallback Avatar either by using style props or by passing a custom icon.
1 <!-- Styles props --> 2<c-avatar size="md" bg="red.500" /> 3 4<!-- Custom default icon --> 5<c-avatar> 6 <c-icon color="white" name="star" /> 7</c-avatar>
In some products, you might need to show a badge on the avatar. We call this a badge
.
The badge is by default on the bottom right corner, but you can change its position by using the prop position
(top-start
| top-end
| bottom-start
| bottom-end
)
1<c-avatar name="Evan You"> 2 <c-avatar-badge bg="red.500" /> 3</c-avatar>
You can also add icons inside the badge if needed :
1<c-avatar name="Evan You"> 2 <c-avatar-badge bg="red.500"> 3 <c-icon color="white" name="minus" w="0.3em" /> 4 </c-avatar-badge> 5</c-avatar>
In some cases, you might need to stack avatars as a group. Use the CAvatarGroup
component.
max
prop. It'll truncate the avatars and show a "+X" label (where X is the remaining avatars).size
prop.spacing
prop.1 2<c-avatar-group max="3" size="lg"> 3 <c-avatar 4 name="Sarah Drasner" 5 src="https://avatars.githubusercontent.com/u/2281088?v=4" 6 alt="Sarah Drasner" 7 /> 8 <c-avatar 9 name="Evan You" 10 alt="Evan You" 11 src="https://www.github.com/yyx990803.png" 12 /> 13 <c-avatar 14 name="Anthony Fu" 15 src="https://avatars.githubusercontent.com/u/11247099?v=4" 16 alt="Anthony Fu" 17 /> 18 <c-avatar 19 name="Maya Shavin" 20 src="https://avatars.githubusercontent.com/u/6650139?v=4" 21 alt="Maya Shavin" 22 /> 23</c-avatar-group> 24
We use a method that generate initials by splitting and merging the first character in each word from the name
prop. But you can also pass the initials you want through the prop initials
.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 7/15 approved changesets -- score normalized to 4
Reason
project is archived
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
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
42 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
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