How to make this transform with React-Native?

React NativeTransform

React Native Problem Overview


i try to use style.transform attribute but i can't make the transform, there is not so many doc , crying ...

enter image description here

here is the css3 code:

> transform: translateZ(-100px) translateX(-24%) translateY(0) > rotateY(60deg);

React Native Solutions


Solution 1 - React Native

Here is a pretty close result:

enter image description here

render() {
  return (
    <View style={styles.container}>
      <View style={styles.child} />
    </View>
  )
},

var styles = StyleSheet.create({
  container: {
      backgroundColor:'green',
      flex: 1,
  },
  child: {
    flex: 1,
    backgroundColor: 'blue',
    transform: [
      { perspective: 850 },
      { translateX: - Dimensions.get('window').width * 0.24 },
      { rotateY: '60deg'},

    ],
  }
});

See full example: https://rnplay.org/apps/Qg7Bhg

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionalucard.gView Question on Stackoverflow
Solution 1 - React NativeJean RegisserView Answer on Stackoverflow