Comments (16)
Like ths:
<SideMenu
animationFunction={animationFunction}
animationStyle={animationStyle}>
...
</SideMenu>
with animationStyle
to have scaled down & moved to the right menu:
const animationStyle = value => {
return {
transform: [{
scale: value.interpolate({
inputRange: [0, 100],
outputRange: [1, 0.95]
})
}],
left: value
};
};
Optionally, you can provide custom animationFunction
to change the speed, just like I did:
const animationFunction = (prop, value) => {
return Animated.spring(prop, {
toValue: value,
friction: 8,
tension: 50
});
};
I think that could go into FAQ
section or to examples/customAnimation.js
since it's pretty cool one and one of the most popular side menu animations in native iOS apps AFAIK.
from react-native-side-menu.
I like the idea. I'd like to see if we can provide some fancy animations and expose a method which let's others override and implement a new animations.
from react-native-side-menu.
Yeah, just a method to get native props before updating. The other part is the animations (hard to tweak, but I am super excited to see new Animations API being implemented). Anyway, the approach with subclassing and exporting might be a good choice and I am not sure if we need any methods/callbacks as with ES6, it's super easy to do it.
from react-native-side-menu.
I gonna implement this in master right after 0.8.0
will become stable
from react-native-side-menu.
Agreed, 0.8 still very buggy at the moment. I stopped using it for production. Can't wait for stable release.
from react-native-side-menu.
It won't change, maybe 0.9 will be better, can you elaborate on that a bit? About to update to 0.8
from react-native-side-menu.
My app is relying on WebViewBridge and there is an open issue with react-native 0.7 and above facebook/react-native#2010 which prevents me to upgrade.
If your app is not using Higher Order Component or WebView, then you should be fine.
from react-native-side-menu.
In principle, we can try to implement it now with react-motion
and freeze this version for react-native
< 0.8. And in 0.8+ we can use Animated
.
from react-native-side-menu.
@Kureev agreed, I really want to get my hands on both libraries. I will try to squeeze my time to implement the simple solution for this and let you know.
from react-native-side-menu.
Solved in 0.12.1
from react-native-side-menu.
Hey, how would something like @grabbou s work look like with the latest version?
from react-native-side-menu.
I absolutely agree that this component could greatly benefit from such examples, especially this one! Thanks for the explanation.
from react-native-side-menu.
@grabbou can you compose it an example or at least add a block into readme?
from react-native-side-menu.
Yeah, will add in a new example later today or at leat add a block (have to figure it out)
from react-native-side-menu.
any update about this theme? 👍
from react-native-side-menu.
Is there any update about this theme?
from react-native-side-menu.
Related Issues (20)
- OpenMenuOffset not working in production.
- Where did the Menu tags come from? HOT 2
- Hardware Back closes App on every scene in side menu
- Sample code does not work HOT 1
- Shadow/Elevation possibility feature request HOT 1
- undefined is not a function (near '..._react2.default.createClass...') Why am i getting this error ?
- TypeError Undefined is not a function (evaluating _firebase.default.initialize app) HOT 1
- SideMenu is visible below the component it is rendered on HOT 6
- 1 to 2 second delay when toggling menu HOT 3
- Crash on iOS when app built in release, works in debug HOT 3
- Is react-native-web supported? HOT 2
- All API props are not available in v1.1.3
- autoClosing prop does not work
- Use native driver for the animation HOT 4
- Side Menu stuck on android device, i can not click any where. it always appear at the left side of the screen and ovellaping the main screen content HOT 1
- Change style overlay
- componentWillMount has been renamed, and is not recommended for use HOT 1
- align problem when phone language is Arabic HOT 3
- Can we get a new release please? HOT 15
- Warnings HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-side-menu.