@luanyata/react-native-avatar
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Screen iPhone with avatar component

Avatar React Native

npm npm GitHub language count Made by Luan Lima License Stargazers

Tecnologies

Installation

npm install @luanyata/react-native-avatar

#or

yarn add @luanyata/react-native-avatar

Usage

import { Avatar } from "@luanyata/react-native-avatar";

// ...

<Avatar
  size={100}
  name="Luan Lima"
  src="https://avatars.githubusercontent.com/u/39541807?v=4"
/>

Props

Name Default Type Description
userName - String The user name that will be used to compute user initials.
initialName - String Force the displayed initials by overriding the computed ones.
src - String Path of image.
active false Boolean Whether the user is active or not.(Show active circle around avatar)
textColor #FFFF String The font color used to render the user initials
activeCircleColor #27ae60 String Background color active circle
size 64 Number The avatar size
rounded false Boolean True if the avatar must be rounded.
loaderColor #aaa69d String The color of loader
backgroundColor - String The avatar background color to use if no image is provided
backgroundColors ['#575fcf', '#ef5777', '#0be881'] Array Array of background colors to choose from, if no background color is specified

Contributing

Inspired by react-native-user-avatar. Thank you Muhsin Keloth

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Package Sidebar

Install

npm i @luanyata/react-native-avatar

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

56.1 kB

Total Files

45

Last publish

Collaborators

  • luanyata