react-strict-dom icon indicating copy to clipboard operation
react-strict-dom copied to clipboard

(feature) css.keyframes() and CSS animations

Open necolas opened this issue 1 year ago • 3 comments

Describe the feature request

Support css.keyframes on native. We can use Animated to polyfill this API and the following CSS props:

  • animationDelay
  • animationDirection
  • animationDuration
  • animationFillMode
  • animationIterationCount
  • animationName
  • animationPlayState
  • animationTimingFunction

necolas avatar Feb 20 '24 21:02 necolas

What you think about reanimated's keyframe animation? is it suitable for it? https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/keyframe-animations/

import { Keyframe } from 'react-native-reanimated';

const keyframe = new Keyframe({
  0: {
    transform: [{ rotate: '0deg' }],
  },
  100: {
    transform: [{ rotate: '45deg' }],
  },
});
import { Keyframe } from 'react-native-reanimated';

const keyframe = new Keyframe({
  from: {
    transform: [{ rotate: '0deg' }],
  },
  to: {
    transform: [{ rotate: '45deg' }],
  },
});

burhanyilmaz avatar Feb 22 '24 08:02 burhanyilmaz