Back to Popmotion

Supported values

packages/popmotion-pose/docs/api/react-native/native-supported-values.md

8.7.1909 B
Original Source

Supported values

<TOC />

Transforms

Pose for React Native supports the animation of all transform values.

rotate, rotateX and rotateY must (currently) be defined as 'deg' values:

javascript
posed.View({
  init: { rotate: '0deg' },
  flip: { rotate: '180deg' }
})

Colors

Color animations (backgroundColor, color etc) are currently only supported as passive values:

javascript
posed.View({
  draggable: 'x',
  passive: {
    backgroundColor: ['x', {
      inputRange: [-200, 200],
      outputRange: ['#f00', '#0f0']
    }]
  }
})

Other values

All other values, defined either as a number or unit type, are animatable.

However, React Animated (the underlying animation library) doesn't currently support native animation of these values, and animating them will disable native animation of all values on that component.