React - How to apply blur effect to my SideBar - javascript

I created a SideBar on my React application, at the moment I need to apply a blur effect to my SideBar, something like this
Here is a link to my codesandbox project, I removed the logic and functionality, leaving only the design in order to make it easier to work

Related

Is it possible to create an absolutely positioned View that only blurs the content behind itself?

I'm having some trouble figuring out if creating an absolutely positioned view that blurs the content behind is even possible in React Native. I couldn't find anything related to blurring in the documentation aside from the fact that you can apply blur to the ImageBackground element.
My initial goal was to make the status bar of Android go on top of the content and have it be transparent and blurry, and I was able to make it transparent, but it seems that the React Native StatusBar component doesn't support any sort of blur so I had to figure out a different way.
This is why I decided to create an absolutely positioned View that would stay under the status bar and give that View a blur, but I didn't find any examples on blurring Views.
Basically 2 approaches:
No external library ->
If want to go ahead with no external library , then you have to use ImageBackground with a blur
And it looks something like this:
With library you need to use react native community blur view :
https://github.com/Kureev/react-native-blur#react-native-communityblur
This package is actually what you want i believe. its better to go with this rather than no package , since there it requires an Image.
Do lemme know in case of any concerns :)

Disable touch action on parent element while keeping on child element in React

I have implemented web page consisted of several layers. It is done using React and ant design.
I used two Ant design Drawers; one from left placement, the other one inside former drawer from bottom placement. The picky issue is when I touch and scroll on top Drawer, the underneath layer is also moving.
So my question is how to disable touch action on underneath layer while enabling touch action on top layer in react, or javascript or css.
Thank you in advance.
My code looks like
<div className="bottomDrawer">
<div className="topDrawer"></div>
</div>

I ViewUI Vue.js show more expanding component

It's used on all the demos, the clickable blurred expand/collapse button. Is there a component for doing this for you or a demo that shows the code/styles used to do it? Would figure since they use it for all their demos and they have variations of it, they must have one in there.
https://www.iviewui.com/components/card-en
I'm hoping there's a wrapper component that does it for you. The blurring effect and the auto-expanding button. I've had to implement my own by hooking into the element and using scrollHeight/clientHeight. Hoping for a component that does the blurring and expansion for you. I'm open to other libraries.
Created my own using $refs and checking scrollHeight and clientHeight.

React Native toggle that responds to tapping and swiping/sliding gestures

I'm trying to create a custom toggle component that will respond to tapping(or pressing) and swiping/ sliding gestures. The toggle should be able to be customizable in terms of its appearance, with different text and "on" styles, which is why I don't think the Switch component would work in my case.
What I am looking to do is something like this:
See image here
If I swipe or click the red portion, it should toggle to the other side.
I am not too sure where to start (I am pretty new to React Native), so any help would be appreciated!

Which NavigationBar?

RN currently has 2 official and a few community developed NavigationBars.
After reading the Navigator comparison it seems that Navigator is the favoured navigation controller implementation (superseding NavigatorIOS), as it allows decoupling the bar from the navigation logic.
But which navigation bar to use with it?
To my knowledge the main contenders are:
Navigator.NavigationBar
https://github.com/Kureev/react-native-navbar.js
Both get the job done, but what are the pros/cons of using one over the other?
Cheers :)
Here is what i've come to find out after playing with the Navigator.
Kureev's react-native-navbar is good if you want to quickly implement a navigation bar that looks similar to NavigatorIOS but with more functionality. The only thing you have to watch out for is the way that he has implemented the actual navbar. You'll notice in his example that he renders the navbar above the content and wraps it in a view, which makes the navbar a "per page basis." So when you push or pop a view the nav bar will change with the view. Currenty there is an issue addressing this thought (#62)
The Navigator component is pretty simple to use. Using the prop navigationBar you can create a consistent navbar that persists on state changes. The one pain i've found, is the navigation bar gets put below the rendered content, so you'll have to use some styling to get it to the top if thats where you want it.
To Sum up:
if you want quick and easy navigation use Kureev's
If you want more flexibility and the ability to do control more of you navigation bar, create a navbar component and use Navigators navigationBar prop.
And dont underestimate the examples from the React Native Team. Navigator examples

Categories