Giter Site home page Giter Site logo

Comments (9)

ranjithkumar8352 avatar ranjithkumar8352 commented on August 17, 2024 8

I tried a different approach instead of using react-native-blur library. I wrote a simple component with absolute positioning, black background, opacity tweaks and used it as backdrop.

Component :

import React,{Component} from 'react';
import {View,Dimensions} from 'react-native';
export default class BlurComponent extends Component {
    render(){
        width = Dimensions.get('window').width;
        height = Dimensions.get('window').height;
        return (
            <View style={{position:'absolute',top:0,left:0,height:height,width:width,backgroundColor:'black',opacity:0.7}}></View>
        )
    }
}

and reference it in backdrop prop

<ActionButton backdrop={<BlurComponent />}>

react native action button blurview

I felt React Native Blur library was too much for this simple use case. Let me know if there are any issues with this approach.

from react-native-action-button.

Sonukr avatar Sonukr commented on August 17, 2024 8

@ranjithkumar8352 : You can try their default props bgColor .

<ActionButton buttonColor="red" bgColor="rgba(0,0,0,.4)" >
    <ActionButton.Item buttonColor='#fff'  title="Add Property" >
         <Icon name="md-beer" style={styles.actionButtonIcon} />
    </ActionButton.Item>
</ActionButton>

ezgif com-resize

from react-native-action-button.

mastermoo avatar mastermoo commented on August 17, 2024

Hey, did you try to give the ActionButton component a prop like this:
<ActionButton backdrop={<VibrancyView blurType="light" style={styles.blur} />}> ...

styles.blur needs to have the width and height of the device in order to blur the background.

from react-native-action-button.

 avatar commented on August 17, 2024

Hey,

thanks for that fast Tipp. Now i do not get any Message, BUT instead of having the blurred look, i only see a red border around my complete screen, when clicking the ActionButton.

Any Idea, how that might come.

from react-native-action-button.

 avatar commented on August 17, 2024

Nevermind I have the Solution :) THANKS SUPER GREAT ANSWER 👍

from react-native-action-button.

nirshubz avatar nirshubz commented on August 17, 2024

@alexanderniebuhr Can you share your solution please? :) I am getting the same red border...

from react-native-action-button.

mastermoo avatar mastermoo commented on August 17, 2024

I think he forgot to link the library (react-native-blur) to his project, if I remember correctly

from react-native-action-button.

nirshubz avatar nirshubz commented on August 17, 2024

For some reason I am still getting Native component for "VibrancyView" does not exist after using rnpm link, but I ll look into it.

Thanks very much!

from react-native-action-button.

ranjithkumar8352 avatar ranjithkumar8352 commented on August 17, 2024

Thanks @Sonukr I think this prop was added recently

from react-native-action-button.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.