Skip to content
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

How to set default text (not animated) #105

Open
llibdude opened this issue Apr 29, 2021 · 3 comments
Open

How to set default text (not animated) #105

llibdude opened this issue Apr 29, 2021 · 3 comments

Comments

@llibdude
Copy link

llibdude commented Apr 29, 2021

I have a use case where I want there to be text already inside Typist so I can then backspace it. I don't want the initial text to be "typed" out.

One thing I tried was to use nested Typist components, where the nested Typist component had 0 typing delays. It almost works but doesn't quite work.

Essentially I want:

<Typist>
  <span>This content is rendered by default without animation.</span>
  <Typist.Backspace count={10} delay={500} />
</Typist>

User would see the sentence and then backspace 10.

My understanding is you can only backspace content that is wrapped by the same Typist component. Is there any mechanism I am missing to accomplish this? Thanks.

@paulphys
Copy link

paulphys commented May 9, 2021

Any updates @llibdude? Did you manage to implement it? I'm running into the same issue

@llibdude
Copy link
Author

I did not manage. In fact the feature was important enough to me that I moved onto another library https://github.com/tameemsafi/typewriterjs. I'm having more success with this library. I very much like the way react-typist works, it's a great library, but I needed the default feature.

I apologize to the authors of this library if it's bad form to link a competing library, but considering there hasn't been development on this library in 2 years and my issue has gone unanswered I'd like to help the community how I can.

@paulphys
Copy link

thanks for your insights. i totally agree with you, it should be fine to advertise a competing library here, since this one seems to be abandoned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants