Highly customisable Crop component for React Native
react-native-avatar-crop
Highly customisable Crop component for React Native.
Usage
check dependencies
let crop;
const {width: SCREEN_WIDTH} = Dimensions.get('window');
<Crop
source={uri}
cropShape={"circle"} // rect || circle
width={SCREEN_WIDTH}
height={SCREEN_WIDTH}
cropArea={{
width: SCREEN_WIDTH / 1.3,
height: SCREEN_WIDTH / 1.3,
}}
borderWidth={0}
backgroundColor={'#FFFFFF'}
opacity={0.7} // 0 till 1, default is 0.7
maxZoom= {3} // default 3
resizeMode={"contain"} // default "cover"
onCrop={cropCallback => (crop = cropCallback)} // returns a function
/>
see full example here
CONTRIBUTING
-
Whether you are a novice or experienced software developer, all contributions and suggestions are welcome!
Clone repo
git clone https://github.com/vemarav/react-native-avatar-crop.git
-
Add features or bug fixes
-
Make a Pull Request
OR
Report a bug here
Feel free to contribute, hosted on ❤️ with Github.
TODO
- [ ] Add rotation support