<div className= "HomePage-typewriter">
I do{'\u00A0'}
<Typewriter
options={{
strings: [
'<span> this </span>',
'<span> that </span>',
'<span> this </span>',
],
autoStart: true,
loop: true,
deleteSpeed: 20,
delay: 55,
pauseFor: 50
}}
/>
</div>
Below is the CSS for styling:
.HomePage-typewriter {
display: inline;
text-align: left;
}
The goal is to have all the text on a single line, with a line break occurring between "I do" and the typewriter text if needed. Here's an example of the desired layout:
https://i.sstatic.net/1uNW8.gif
A problem arises when using display: flex
instead of display: inline
, causing a line-break in "I do" as shown here: