React Native Community Blur Background View Android iOS Example

Welcome friends, In today’s tutorial we would learn about an amazing react native npm package known as @react-native-community/blur . The React Native Community Blur package is used to create blur background view in react native both android & iOS applications. There are basically 3 type of blur effects available in React Native Community Blur package dark, light and xlight. Today we would make a react native application and install the @react-native-community/blur package in our project app using NPM server. After done installing we would write the code of making blur view in react native. So let’s get started 🙂 .

Contents in this project React Native Community Blur Background View Android iOS Example:-

1. The first step is to install the @react-native-community/blur package in our project. So open your project’s Root directory in Command Prompt or Terminal and execute below command.

Screenshot:

Screenshot after done installation:-2. Now in android you don’t have to execute any other command for installation process. But for iOS we have to execute below command to complete the installation process.

Screenshot after done installing pod :

3. Now the next step is to start the coding for the app. So open your project’s main App.js file and import View, StyleSheet, Text, Image & BlurView component in your project.

4. Creating our main export default App functional component.

5. Now in the return block first we would make a Root View component -> The Background Image component -> BlurView Component. Now we would make a Text component to show which blur effect we’re applying on the Blur View component.

There are basically 3 types of BlurView effects available here :-

1. dark

2. light

3. xlight

Available Prop :

1. style :- Used to apply style on blur View component.

2. blurType :- Used to set blur type, supported values are dark, light, xlight.

3. blurAmount:- Used to set Adjusts blur intensity.

4. reducedTransparencyFallbackColor :- iOS only, black, white, #rrggbb, etc – background color to use if accessibility setting ReduceTransparency is enabled.

6. Creating Style.

7. Complete Source Code for App.js file:-

Screenshots:-

React Native Community Blur Background View Android iOS Example

3 Comments

  1. Kindly upload image uplad to php server

  2. Rn fetch blob is not working with new expo version.
    Any other option

Leave a Reply

Your email address will not be published.