oblador / react-native-animatable

Standard set of easy to use animations and declarative transitions for React Native
MIT License
9.84k stars 702 forks source link

letter by letter Fade Out #188

Open voody2506 opened 6 years ago

voody2506 commented 6 years ago

Hello! Can I realize letter by letter Fade out using this library? I am sorry if it is a duplicate question , but I can not find answer. Thanks!

mattyclarkson commented 6 years ago

You can, you'd have to wrap each letter inside and animatable Text and set the delay to be staggered so that each fade occurs after one another.

voody2506 commented 6 years ago

Okay, thank you! I will try to do this. Can you please give me some little example?

mattyclarkson commented 6 years ago
const style = { opacity: 1 };
<View>
  <Text transition="opacity" style={style} duration={100} delay={0}  >A</Text>
  <Text transition="opacity" style={style} duration={100} delay={100}>B</Text>
  <Text transition="opacity" style={style} duration={100} delay={200}>C</Text>
</View>