-
Notifications
You must be signed in to change notification settings - Fork 25
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
Have initial text ready #20
Comments
Hi, since the default wrapper for the animation is a <span style={{ fontSize: '2em' }}>
<span>We produce food for</span>{' '} // <--- will be pre-typed
<TypeAnimation
sequence={[
'Mice',
1000,
'Hamsters',
1000,
'Guinea Pigs',
1000,
'Chinchillas',
1000,
]}
repeat={Infinity}
/>
</span> But in that case, you couldn't animate that pre-typed string later in the animation sequence. |
Oh I meant like it is "We produce food for Mice" initially and "Mice" gets replaced by "Hamsters", etc. |
I see, so something like <TypeAnimation
preRenderFirstString={true}
sequence={[
'A'
1000,
'B',
1000,
'C',
1000
]}
repeat={Infinity}
/> Results in: 'A' (pre-rendered), 1s delay, 'B', 1s delay, 'C', 1s delay, 'A', ... Sounds like a good feature, especially for SEO if you use server-side rendering. It's not possible yet but I'll add it in the following days. |
hey! checking in on the |
Added in version |
Hello,
Awesome package btw. I was wondering if there's a way of having initial text there, instead of initially having nothing and typing it out the first time.
The text was updated successfully, but these errors were encountered: