Search code examples
javascriptreactjsreact-nativelayout-animation

Is threre a list of available options for LayoutAnimation.Types and LayoutAnimation.Properties?


I have checked the documentation and as now it only says

create, config for animating in new views (see Anim type)

update, config for animating views that have been updated (see Anim type)

The fact is that i dont understand what Anim type is and where im supposed to look after that. Thanks for the help

https://facebook.github.io/react-native/docs/layoutanimation.html


Solution

  • I found it in the LayoutAnimation.js source code from react native

    const TypesEnum = {
      spring: true,
      linear: true,
      easeInEaseOut: true,
      easeIn: true,
      easeOut: true,
      keyboard: true,
    };
    
    
    const PropertiesEnum = {
      opacity: true,
      scaleXY: true,
    };
    

    I might have missed something so feel free to add if there is more, thank you :)