-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support animation classes #24
Comments
Adding my thoughts on different approaches:Adding simple animation class support like: Usage
Generated
In the CSS generator, we could add the respective keyframes and animation property to be added in styled-components. One problem that I think is we may add the keyframes multiple times if used in different components. For Custom animation support -> We may just need to read the theme config and update the string. Another approach could be: Defining animation keyframes in styled-components and exporting them through lib. For eg:
The benefit is the user gets more control over different properties. |
Hey @jyash97, RN doesn't support keyframes. Instead, we supposed to use RN Animated API. From my understanding, we shouldn't directly import styled-wind animation class it may throw an error. Please correct me if I'm wrong. |
@devevignesh you are right, react native not supporting key frames is a huge road block, we need to find a work around for that. If that is not possible the last resort is that we can continue to generate keyframes in react native also and styled-components will warn the developer that keyframes are not supported in react native https://styled-components.com/docs/basics#react-native |
@jyash97 the first approach seems to be more scalable (has more edge cases though). If we use the second case then we may need to define a lot of animation type like spin, bounce etc which is less flexible and hard to maintain. |
Hi, @ameerthehacker is this issue still relevant? If so I can try to pick this up |
Right now we are not supporting animation classes from tailwind, if we can get this through we would be a step more closer for react native support.
The text was updated successfully, but these errors were encountered: