Hello Friends đź‘‹,
Welcome To Infinitbility! ❤️
This article will help you to add blur effect on your react native images and background images, here you will get answer of how to add blur effect in image react native.
Let start today article How to blur background in react native
Introduction
React Native provide blurRadius
attribute to make blur images it’s work on both component ( Image and ImageBackground ). both component is support blurRadius
attribute and you have to blur image between 1 to 100 numbers.
blurRadius Example
Below example wil explain, how to use blurRadius
in image component of react native with code example and output.
Here, we use blurRadius
with 10 values and see what we get?
import React, { Component } from 'react';
import { AppRegistry, View, Image, StyleSheet } from 'react-native';
const styles = StyleSheet.create({
container: {
flex: 1,
},
image: {
flex: 1,
},
});
class DisplayAnImage extends Component {
render() {
return (
<View style={styles.container}>
<Image
style={styles.image}
source={{uri: 'https://i.pinimg.com/564x/16/d6/68/16d668bd5bf00285a7e21899eb4b420f.jpg'}}
blurRadius={10}
/>
</View>
);
}
}
export default DisplayAnImage;
Output
Thanks For Reading…