useravatar-react-native

1.0.4 • Public • Published

React Native UserAvatar

A bare-bones user avatar display with support for falling back to using the user's initials on a colored background as the avatar. Based on the great library for React: https://github.com/mahendramahi/useravatar-react-native, and ported to React Native.

Installation

npm install --save useravatar-react-native or yarn add useravatar-react-native

Usage

   <UserAvatar
        src={'https://picsum.photos/200'}
        name={'User Name'}
        size={35}
      />
 
      <UserAvatar
        src={'https://truworth-video-in.s3-ap-south-1.amazonaws.com/foodimage/initial-image.png'}
        name={'User Name'}
        size={35}
      />

Handle onError of image

if You have urls which is give xml or AccessDenied like this:- this npm module support it and render initials or user name.

Credits

@https://github.com/mahendramahi

License

MIT

Package Sidebar

Install

npm i useravatar-react-native

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

302 kB

Total Files

9

Last publish

Collaborators

  • mahendramahi