Skip to content

Commit 858e0d1

Browse files
committed
no message
1 parent 5360099 commit 858e0d1

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

README.md

+46
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,52 @@ deactivedViewStyleHandler={({ location, action, isNestedRoute }) => {
240240

241241
```
242242

243+
### transition up like Scaling
244+
245+
![Scaling Transiction Up Animation](https://raw.githubusercontent.com/Taymindis/react-router-native-animate-stack/master/demo/scale_and_moveup.gif)
246+
247+
```jsx
248+
activedViewStyleHandler={({ location, action, isNestedRoute }) => {
249+
return {
250+
paddingLeft: 30,
251+
transform: [
252+
{
253+
translateY: enterAnimKit.interpolate({
254+
inputRange: [0, 1],
255+
outputRange: [height, 0],
256+
}),
257+
},
258+
{
259+
scale: enterAnimKit.interpolate({
260+
inputRange: [0, 0.5, 1],
261+
outputRange: [1, 0.2, 1],
262+
}),
263+
},
264+
],
265+
};
266+
}}
267+
deactivedViewStyleHandler={({ location, action, isNestedRoute }) => {
268+
return {
269+
paddingLeft: 30,
270+
transform: [
271+
{
272+
translateY: exitAnimKit.interpolate({
273+
inputRange: [0, 1],
274+
outputRange: [0, -height],
275+
}),
276+
},
277+
{
278+
scale: exitAnimKit.interpolate({
279+
inputRange: [0, 0.5, 1],
280+
outputRange: [1, 0.2, 1],
281+
}),
282+
},
283+
],
284+
};
285+
}}
286+
287+
```
288+
243289

244290
## Reason of created this
245291

demo/scale_and_moveup.gif

173 KB
Loading

0 commit comments

Comments
 (0)