Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chakra-ui/avatar

Package Overview
Dependencies
Maintainers
2
Versions
508
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/avatar

A React component used to show users avatar or initials

  • 2.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
484K
decreased by-0.82%
Maintainers
2
Weekly downloads
 
Created

What is @chakra-ui/avatar?

@chakra-ui/avatar is a component library for creating avatars in React applications. It provides a simple and flexible way to display user profile pictures, initials, or fallback icons when no image is available.

What are @chakra-ui/avatar's main functionalities?

Basic Avatar

This feature allows you to create a basic avatar with a name and an image source. If the image source is provided, it will display the image; otherwise, it will display the initials of the name.

import { Avatar } from '@chakra-ui/avatar';

function BasicAvatar() {
  return <Avatar name='John Doe' src='https://bit.ly/dan-abramov' />;
}

Avatar with Fallback

This feature allows you to create an avatar that displays the initials of the name if no image source is provided.

import { Avatar } from '@chakra-ui/avatar';

function AvatarWithFallback() {
  return <Avatar name='John Doe' />;
}

Avatar Group

This feature allows you to create a group of avatars. You can specify the maximum number of avatars to display, and the rest will be shown as a count.

import { Avatar, AvatarGroup } from '@chakra-ui/avatar';

function AvatarGroupExample() {
  return (
    <AvatarGroup size='md' max={2}>
      <Avatar name='Ryan Florence' src='https://bit.ly/ryan-florence' />
      <Avatar name='Segun Adebayo' src='https://bit.ly/sage-adebayo' />
      <Avatar name='Kent Dodds' src='https://bit.ly/kent-c-dodds' />
      <Avatar name='Prosper Otemuyiwa' src='https://bit.ly/prosper-baba' />
    </AvatarGroup>
  );
}

Other packages similar to @chakra-ui/avatar

Keywords

FAQs

Package last updated on 18 Jul 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc