Socket
Socket
Sign inDemoInstall

react-native-blur

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-blur

React Native Blur component


Version published
Weekly downloads
613
increased by6.06%
Maintainers
1
Weekly downloads
 
Created
Source

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 name ➜ Add Files to <...>
  3. Go to node_modulesreact-native-blur ➜ add RNBlur and RNVibrancy folders
  4. 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:

var BlurView = require('react-native-blur').BlurView;

var Menu = React.createClass({
  render: function() {
    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

var VibrancyView = require('react-native-blur').VibrancyView;

var Menu = React.createClass({
  render: function() {
    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

Keywords

FAQs

Package last updated on 17 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc