Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figma 'Layer blur' effect #36

Closed
teodorciuraru opened this issue Apr 10, 2020 · 5 comments
Closed

Figma 'Layer blur' effect #36

teodorciuraru opened this issue Apr 10, 2020 · 5 comments

Comments

@teodorciuraru
Copy link

"react-native": "^0.62.0"
"react-native-image-filter-kit": "^0.7.1"

First of all, thank you for this great package. It really levels up your app's UI.


Q: How can I achieve blurring the bottom margin of this view? (or any other way to remove that visual delimiter)

Simulator Screen Shot - iPhone SE 13 2 - 2020-04-10 at 14 26 10

I want it to look more like this:

Simulator Screen Shot - iPhone 11 Pro Max 13 2 - 2020-04-10 at 14 26 11

@iyegoroff
Copy link
Owner

@teo029, thanks for the feedback!

How does the original image look?

@teodorciuraru
Copy link
Author

teodorciuraru commented Apr 10, 2020

I have two versions:

gradient2

And exported with blur (but which will result in delimiter):

gradient

I export them via Figma and the blur effect is called 'Layer Blur'. The GaussianBlur from the package acts more like Figma's 'Background Blur' (that meaning, blur without overflowing the image). I also MultiplyBlend the logo image over this gradient.

<MultiplyBlend
          srcImage={
            <ClubProfileGradient
              source={require('~/screens/main/assets/gradient.png')}
            />
          }
          dstTransform={{
            anchor: { x: 0.5, y: 0.45 },
            scale: { x: 0.9, y: 0.7 },
          }}
          resizeCanvasTo={'srcImage'}
          dstImage={
            <RGBA
              alpha={0.2}
              image={
                <BoxBlur
                  image={
                    <ClubProfileGradient
                      resizeMode={'contain'}
                      source={require('~/screens/main/assets/profile-photo.png')}
                    />
                  }
                />
              }
            />
          }
        />

I usually work with SVG, but couldn't replicate the blur effect with any SVG library so I had to import the image as is. Maybe some effects combinations of effects might work.

@iyegoroff
Copy link
Owner

Maybe increasing the size of white-colored area for second image will reduce the difference between image bottom and background?

@teodorciuraru
Copy link
Author

Trying different methods to do that. I will keep you updated.

@teodorciuraru
Copy link
Author

Solve it with some Drop Shadow from Figma. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants