DEV Community

Sascha Manns
Sascha Manns

Posted on • Originally published at saschamanns.de on

9

Animated Typing Utility with JavaScript

Ever wished a animated typing effect in your webproject? If yes, you should definitive check out the typit.js library. Last days i stumbled upon that interesting library.

The effect looks like:

How could you implement it?

Let we say, you would like to use this effect to show others your different job experiences.

First place a tag inside your code like that one:

<p id="replaceJobs"></p>

Then create a typeit.js file with the content

new TypeIt('#replaceJobs', {
    strings: ["Job1", "Job2", "Job3"],
    speed: 200,
    cursorSpeed: 1000,
    nextStringDelay: 750,
    loop: true,
    breakLines: false,
    waitUntilVisible: true
}).go();

Now add the JavaScript to your Layout Section:

<script src="https://cdn.jsdelivr.net/npm/typeit@VERSION_NUMBER/dist/typeit.min.js"></script>

and refer your typeit.js to that page, where your "replaceJobs" tag is placed. Now your type effect will start :-)

More on: https://typeitjs.com/

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (1)

Collapse
 
alexmacarthur profile image
Alex MacArthur

Great, straightforward instructions on getting up & running with TypeIt. Thx, Sascha!

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay