Installations
npm install @chakra-ui/c-avatar
Developer Guide
Typescript
Yes
Module System
CommonJS, ESM
Node Version
16.16.0
NPM Version
8.11.0
Score
54.2
Supply Chain
56.6
Quality
77.2
Maintenance
100
Vulnerability
98.2
License
Releases
@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
Contributors
Unable to fetch Contributors
Languages
TypeScript (81.11%)
Vue (17.15%)
JavaScript (0.74%)
EJS (0.74%)
HTML (0.27%)
Developer
Download Statistics
Total Downloads
21,287
Last Day
19
Last Week
60
Last Month
205
Last Year
2,181
GitHub Statistics
261 Stars
1,381 Commits
33 Forks
11 Watching
80 Branches
16 Contributors
Package Meta Information
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
Total Downloads
Cumulative downloads
Total Downloads
21,287
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
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
5
Peer Dependencies
1
Dev Dependencies
1
@chakra-ui/c-avatar
The avatar component is used to represent user and displays the profile picture initials or fallback icon
Installation
1yarn add @chakra-ui/c-avatar 2# or 3npm i @chakra-ui/c-avatar
Imports
This packages exports the following components:
- CAvatar : The image that represents the user.
- CAvatarBadge : A wrapper that displays its content on the right corner of the avatar.
- CAvatarGroup : A wrapper to stack multiple Avatars together.
Usage
Default :
1<c-avatar 2 name="Evan You" 3 alt="Evan You" 4 src="https://www.github.com/yyx990803.png" />
Avatar Sizes :
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
Avatar Fallbacks :
If there is an error loading the src
of the avatar, there are 2 fallbacks :
- If there's a
name
prop, we use it to generate the initials and a random, accessible background color. - If there's no
name
prop, we use a default Avatar.
Customize the Fallback 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>
Avatar with badges
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>
Avatar Group
In some cases, you might need to stack avatars as a group. Use the CAvatarGroup
component.
- To limit the amount of avatars to show, use the
max
prop. It'll truncate the avatars and show a "+X" label (where X is the remaining avatars). - To size all the avatars equally, pass the
size
prop. - To adjust the spacing between the avatars, pass the
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
Initials
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
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 7/15 approved changesets -- score normalized to 4
Reason
project is archived
Details
- Warn: Repository is archived.
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/auto-merge.yml:1
- Warn: no topLevel permission defined: .github/workflows/dev.yml:1
- Warn: no topLevel permission defined: .github/workflows/quality.yml:1
- Warn: no topLevel permission defined: .github/workflows/release.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/auto-merge.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/chakra-ui/chakra-ui-vue-next/auto-merge.yml/develop?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/auto-merge.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/chakra-ui/chakra-ui-vue-next/auto-merge.yml/develop?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dev.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/chakra-ui/chakra-ui-vue-next/dev.yml/develop?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/quality.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/chakra-ui/chakra-ui-vue-next/quality.yml/develop?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/chakra-ui/chakra-ui-vue-next/release.yml/develop?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/chakra-ui/chakra-ui-vue-next/release.yml/develop?enable=pin
- Info: 0 out of 4 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 third-party GitHubAction dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'develop'
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 27 are checked with a SAST tool
Reason
42 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-hpx4-r86g-5jrg
- Warn: Project is vulnerable to: GHSA-prr3-c3m5-p7q2
- Warn: Project is vulnerable to: GHSA-p2fh-2h23-6grg
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-96g7-g7g9-jxw8
- Warn: Project is vulnerable to: GHSA-pfq8-rq6v-vf5m
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4
- Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2
- Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
2.9
/10
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