Hey, @RasmusDesign this is not possible to achieve natively on webflow however you can add custom code to do that.
You can clone this and just replace strings: ["Hello, my name is John.", "Hello, my name is Lisa.", "Hello, my name is Beetlejuice."], to your desired strings.
In the above code “.typed-text” is a reference to the class called “typed-text” located in the Hero Content Div as seen in the below picture. The “typed-text” class is actually just a span inside the paragraph subtitle, in which I deleted all the text, so that no text is present before the script starts running.
I have no idea why, but for some reason there seems to be a bug in which it skips the first string in the array. As you can see on rasmusdesign.webflow.io, ‘pixel-perfect’ is not present on the site. Also, it is worth noting that you have to publish the site to see it in action. Preview doesn’t work for this.
Hope this helps.
PS. If anyone knows why it’s skipping the first string, please let me know.
@RasmusDesign very cool. I have never injected code before, so I am not exactly sure where to navigate to read everything… but for some reason whatever is calling your script is starting the array at 1. Arrays start at 0, so if you do have a call imbedded somewhere, does it show what is being called first?
Either it’s initializing it at 1, or it’s going through the loop prior to typing the first word (this is often due to a while statement instead of an if statement).
I don’t think this is the issue… but I wonder if it’s because you nest the function script in the footer vs header. In his example site, he has it sitting in the header, where as yours is in the footer.
Footer is better for HTML rendering though… and your site is loading very fast… so if it slows it down too much, I would just rearrange your array (put the last word you want at the beginning of the array and first word in position 2 of array [technically 1])