0.0.1 • Published 8 months ago

@licuido-ui/ui_profile-avatar v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

ProfileAvatar

The ProfileAvatar component provides a customizable avatar with an overlaying badge containing an icon. It can be used to display profile images along with status or notification icons.

Installation

npm i @licuido-ui/ui_profile-avatar

Author

Link

Story Book Link EmptyPage

PlayGround

Try it have a fun codeBox

Import component

import { ProfileAvatar } from '@licuido-ui/ui_profile-avatar';

Usage

import { ProfileAvatar } from '@licuido-ui/ui_profile-avatar';
import { Icon } from '@mui/material';

const MyComponent = () => {
  return (
    <ProfileAvatar
      imgSrc='avatar.jpg'
      variant='circular'
      icon={<Icon>notifications</Icon>}
      iconStyle={{ color: 'white' }}
    />
  );
};

Image

alt text

Props

PropTypeDefaultDescription
classNamestring''Additional class name for custom styling
sxSxProps{}Custom styles using MUI's sx prop system
avatarStyleSxProps{}Custom styles for the Avatar component
variantstring'rounded'Avatar variant ('rounded', 'square', or 'circular')
imgSrcstring''Image source URL for the Avatar component
onClick() => void() => {}Click event handler for the Avatar component
iconReactElement<></>Icon for the Avatar component
iconStyleSxProps{}Custom styles for the icon
badgeStyleSxProps{}Custom styles for the badge container
deleteIconReactElementCustom IconIcon for deleting the uploaded image