Avatar
An image element with a fallback for representing the user.
Installation
npx react-nex add AvatarComponents of Avatar
Avatar Image
Avatar Fallback
RN
Examples
Size
There are total 6 sizes in Avatar component as shown below
Custom ClassName
Style as you want using tailwind
Props
alt
- Type:
string - Description: The alternate text for the avatar image.
className
- Type:
string - Description: Additional tailwind classes to apply to the avatar container.
size
- Type:
string - Description: The size of the avatar.
- Values:
xs: Extra smallsm: Smallmd: Medium (default)lg: Largexl: Extra large2xl: Double extra large
- Values:
src
- Type:
string - Description: The URL of the avatar image.