-
Notifications
You must be signed in to change notification settings - Fork 24
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
Prevent items from getting pushed around in multiline text #42
Comments
Hey, there's a small docs section about CSS caveats, maybe that's useful. You can define fixed dimensions for the animation via css or the <TypeAnimation
style={{ height: '195px', display: 'block' }} // Set a fixed height to not shift other elements vertically
/> In addition to defining a fixed width/height, it's important you set display as On a side note: I don't quite understand what that |
Hey @maxeth , thx for the reply. Not exactly what I was looking for, since it would be very hard to make the container responsive with a fixed height. As far as I understand, on react-typewriter, they have visible and invisible characters; and invisible characters can have one of 2 styles depending on the However, I haven't had the chance to see the innner workings of this module, so feel free to close this issue if it's not feasible to implement. |
Thanks for explaining. Seems pretty useful, and it would theoretically be possible to add such a prop. Maybe for now you could try rendering the So something like this: <div style={{position:"relative"}}>
<TypeAnimation style={{position:"absolute"}}/>
<div style={{opacity: "0"}} aria-hidden={true}>Longest possible sequence here</div>
</div> |
I'm not sure if this is possible because it might have been built differently, but I was looking for something like the
fixed
prop from react-typewriter. Something that would pre-render the space needed for the text to prevent items below the typing component to get pushed down in the case of multiline text (or even single line text - there is a small tilt from 0 lines to 1 line).The text was updated successfully, but these errors were encountered: