-
Tailwind CSS allows to defined custom animation and keyframe values in user config: https://tailwindcss.com/docs/animation#using-custom-values How can I achieve something similar with Twind? My current solution is to manually include keyframe styles on the page: const customStyles = `
@keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
`;
...
<style dangerouslySetInnerHTML={{ __html: customStyles }} /> and then <div class="animate-[fadeIn_0.2s_ease-in-out]"> |
Beta Was this translation helpful? Give feedback.
Answered by
zaynetro
Jul 28, 2023
Replies: 1 comment 1 reply
-
See the twind docs: https://twind.dev/handbook/css-in-twind.html#the-keyframes-function |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! I was reading their new https://twind.style/ website and couldn't find anything I could understand about animations. Luckily, the examples from the old website worked.
So fade in animation using twind v1 could be done like this