Closed pinuts-LucasKristandt closed 2 years ago
Hello there.
When TextTransition is not visible on load and will be visible due to window resize
What do you mean exactly by that? Is the TextTransition outside the viewport of the screen? and you have something like a parent with overflow hidden?
It would be great if you could reproduce it in a CodeSandBox example. cuz I have very little info to work with here.
Thanks.
I'm not sure if I have the same issue as him but my text-transition width is at auto, so basically it's just occupying the whole width of the parent box. Example: https://codesandbox.io/s/trusting-sun-35wmx?file=/src/App.js
The S on the code example is just staying at the bottom, if I use display: flex it fixes it a bit but it doesn't have that smooth slide effect.
Hey @jvincent3
I think you want the width to be animated if I understood you correctly.
For that, you just have to pass the inline
flag.
<TextTransition
text={TEXTS[index % TEXTS.length]}
springConfig={presets.wobbly}
inline
/>
When TextTransition is not visible on load and will be visible due to window resize it does not update its width and therefore stays invisible -> width: 0px;