1.0.0 • Published 4 years ago

react-native-profile-picture v1.0.0

Weekly downloads
112
License
MIT
Repository
github
Last release
4 years ago

react-native-profile-picture

Profile picture component for React Native.

Profile Picture Demo

Installation

npm install --save react-native-profile-picture

Documentation

PropDescriptionTypeDefaultRequired
isPictureIf it is true, profile picture is shown. If it is false, the first letters of the words in the user name you have given with the user parameter, are shown.boolean-YES
requirePicturePicture require. (require('./assets/profilpicture.png'))numbernullNO
URLPicturePicture url.stringnullNO
pictureResizeModeTitle of select picker modal.number60NO
userUser name.stringnullNO
widthWidth of profile picture.number50NO
heightHeight of profile picture.number50NO
shapeShape of profile picture. ('circular', 'rounded')string'circular'NO
pictureStyleProfile picture's style.objectnullNO
backgroundColorProfile picture container's style. (If isPicture is false)string'indigo'NO
userTextColorUser text's color.string'white'NO
userTextStyleUser text's style.string'white'NO
userContainerStyleThe style of the string consisting of the first letters of the words of the username.objectnullNO

Usage

// With requirePicture
<ProfilePicture
    isPicture={true}
    requirePicture={require('./assets/avatar.jpg')}
    shape='circle'
/>

// With URLPicture
<ProfilePicture
    isPicture={true}
    requirePicture="http://examplepicturesite.examplecom/picture/profilepicture.png"
    shape='rounded'
/>

// With user name
<ProfilePicture
    isPicture={false}
    user="FirstName ListName"
    shape='rounded'
/>