react-native-blur icon indicating copy to clipboard operation
react-native-blur copied to clipboard

Is it possible to use borderRadius on BlurView?

Open tbolt opened this issue 10 years ago • 3 comments

Doesn't appear to be taking borderRadius even when I have BlurView nested inside a and put a borderRadius on the View.

tbolt avatar Apr 10 '16 14:04 tbolt

overflow: 'hidden' on the parent container does the trick.

kaifaust avatar Apr 15 '16 18:04 kaifaust

how to set border radius on bottom left and right ?

CarlosDanielDev avatar Sep 14 '20 14:09 CarlosDanielDev

how to set border radius on bottom left and right ?

Firstly create main which will hold all borderRadius such as bottom left and right and inside in that View just add BlurView without borderRadius.

Also add overflow: 'hidden' to the View to get the borderRadius working

Example:

<View style={{ 
            borderRadius: 9, 

            borderTopRightRadius: 0, 
            borderTopLeftRadius:0, 
            overflow: "hidden",  
            flex: 1,  
            width: "100%",  
            backgroundColor: "transparent". 
        }}>
        <BlurView
            blurType={"light"}
            blurAmount={20}
            reducedTransparencyFallbackColor="rgba(37,42,54,.25)"
            style={[
                {  
                    width: "100%", 
                    height: 100,
                    backgroundColor: "rgba(37,42,54,0.25)",
                }
            ]}
        >
            {/* ADD CONTENT */}
        </BlurView>
</View>

DasArthur avatar Oct 26 '20 07:10 DasArthur