React Native Blur component
Go to file
Kureev Alexey 79a8ab4aed Fix problems with example project run 2015-10-06 00:11:17 +02:00
examples/Basic Fix problems with example project run 2015-10-06 00:11:17 +02:00
ios Fix problems with example project run 2015-10-06 00:11:17 +02:00
node_modules/react-native/React/Views Fix problems with example project run 2015-10-06 00:11:17 +02:00
src Rebuild react-native-blur for RN-0.11.4 2015-10-05 22:42:23 +02:00
.eslintrc Rebuild react-native-blur for RN-0.11.4 2015-10-05 22:42:23 +02:00
.flowconfig Rebuild react-native-blur for RN-0.11.4 2015-10-05 22:42:23 +02:00
.gitignore Rebuild react-native-blur for RN-0.11.4 2015-10-05 22:42:23 +02:00
.npmignore Rebuild react-native-blur for RN-0.11.4 2015-10-05 22:42:23 +02:00
.watchmanconfig Rebuild react-native-blur for RN-0.11.4 2015-10-05 22:42:23 +02:00
README.md Adjust README examples 2015-10-05 22:56:18 +02:00
index.js Rebuild react-native-blur for RN-0.11.4 2015-10-05 22:42:23 +02:00
package.json 0.7.0 2015-10-05 22:56:41 +02:00

README.md

React Native Blur

Component implementation for UIVisualEffectView's blur and vibrancy effect.
Check the roadmap here

Content

Installation

  1. npm install react-native-blur
  2. In the XCode's "Project navigator", right click on project's Libraries folder ➜ Add Files to <...>
  3. Go to node_modules/react-native-blur/ios ➜ select RNBlur and click "add"
  4. Inside your code include JS part by adding
const { BlurView, VibrancyView } = require('react-native-blur');
  1. Compile and have fun!

Usage example

First of all, if you don't want to read it, you can just clone the repo and go into examples/basic folder to try out working example.

Blur View

To use blur view, you need to require BlurView to your module and insert <BlurView> tag inside render function as it's done below:

const { BlurView } = require('react-native-blur');

const Menu = React.createClass({
  render() {
    return (
      <Image source={{uri}} style={styles.menu}>
        <BlurView blurType="light" style={styles.blur}>
          <Text>Hi, I am a tiny menu item</Text>
        </BlurView>
      </Image>
    );
  }
});

In this example, Image component will be blurred, a BlurView content will stay untouched.

Vibrancy View

The vibrancy effect lets the content underneath a blurred view show through more vibrantly

const { VibrancyView } = require('react-native-blur');

const Menu = React.createClass({
  render() {
    return (
      <Image source={{uri}} style={styles.menu}>
        <VibrancyView blurType="light" style={styles.blur}>
          <Text>Hi, I am a tiny menu item</Text>
        </VibrancyView>
      </Image>
    );
  }
});

Component properties

  • blurType (String) - blur type effect
    • xlight - extra light blur type
    • light - light blur type
    • dark - dark blur type

Questions?

Feel free to contact me in twitter or create an issue