-
Notifications
You must be signed in to change notification settings - Fork 14
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
Elements are not being animated after building, works fine in dev server #50
Comments
Hi @DarthGigi , you should use: import Motion from 'svelte-motion/src/motion/MotionSSR.svelte'; In the introduction explaining about this: https://svelte-motion.gradientdescent.de/ (SvelteKit section) |
Hi @candidosales, thank you so much for your reply! I somehow missed that part in the docs 😅 . I still have a small problem: the I have updated my minimal repro: https://stackblitz.com/edit/sveltejs-kit-template-default-gmkp1v Screenshot.2024-09-03.at.09.23.56.PM.mp4How it should work:Screenshot.2024-09-03.at.09.26.04.PM.mp4Any idea on what could be the issue and/or how to fix it? |
@DarthGigi , I think you can use <Motion let:motion key={i} initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }} variants={framerProps} transition={{ duration, delay: i * delayMultiple }}> Another suggestion, you can use animejs is lighter than svelte motion library and you can find many examples of how animate letters: https://tobiasahlin.com/moving-letters/ |
@candidosales Thanks for you reply again! Your suggestion didn't work unfortunately, the text is still visible on page load and opacity actually broke in the letters sliding in from the right. Do you have any other ideas? |
Hi @DarthGigi, I think we can solve this by managing the transition time. I have increased the duration to 1.5 seconds. Please check and let me know your thoughts. |
Elements are not being animated after building the project. In a development server, they are being animated.
I've made a minimal repro: https://stackblitz.com/edit/sveltejs-kit-template-default-gmkp1v
npm run dev
, you will see that the text is being animatednpm run build && npm run preview
, you will see that the text does not animate and just pops into existenceI'm not sure if I'm missing something or doing something wrong?
The text was updated successfully, but these errors were encountered: