• Days
  • Hours
  • Minutes
  • Seconds

Thanks for reading!
Interested in having us design a high converting website for you? Click here. Or check out our stunning line of easy-to-customize brand + website templates.

How to Add Animated Typing Text to your Showit or Elementor Website

Build Your Website & Brand, Tutorials

filed in

Since sharing our Ed Sheeran design concept on Instagram, several people have reached out asking us how to add an animated typing text effect to their website. In this post, we’ll teach you how to add this effect to both Showit and Elementor websites.

Adding Animated Typing Text in Elementor

We’ve used this animated text effect on our website for quite some time. There are a number of plugins that will add this, but we like Essential Addons.

After installing the plugin, activate the Fancy Text element. Then edit a page with Elementor, find the Fancy Text module, and drag it into your page. From there you can customize the text, timing, formatting, etc. We love how easy it is to format this box without any code.

How to add animated typing text to an Elementor website

How to add Typing Text to a Showit Website

Adding typing text to a Showit website requires a bit more work as you’ll need a bit of code.


Add this code to the the page using an embed box. You’ll want to change the text “you see below “The Sum of it all” and “watch now” to your text.

<center><a href="" class="typewrite" data-period="2000" data-type="[ &quot;The sum of it all&quot;, &quot;Watch Now&quot; ]">
    <span class="wrap"></span>
  </a></center>


Add this code to the CSS section of your page:

.typewrite{
    color: white!important;
    text-transform: lowercase;
    line-height: 1;
    font-size: 140px;
    text-align: center;
    font-family: 'Delight Mother';
    font-weight: 400;
    font-style: normal;
}


/* Tablets in portrait mode (768-980px) */
@media only screen and ( min-width: 768px ) and ( max-width: 980px ) {
   .typewrite{
    font-size: 80px;
   
}
}

/* Phone And Below */
@media all and (max-width: 479px) {
    .typewrite{
    font-size: 50px;
   
}
}

Add this section of code to the javascript portion of your page:

var TxtType = function(el, toRotate, period) {
        this.toRotate = toRotate;
        this.el = el;
        this.loopNum = 0;
        this.period = parseInt(period, 10) || 2000;
        this.txt = '';
        this.tick();
        this.isDeleting = false;
    };

    TxtType.prototype.tick = function() {
        var i = this.loopNum % this.toRotate.length;
        var fullTxt = this.toRotate[i];

        if (this.isDeleting) {
        this.txt = fullTxt.substring(0, this.txt.length - 1);
        } else {
        this.txt = fullTxt.substring(0, this.txt.length + 1);
        }

        this.el.innerHTML = '<span class="wrap">'+this.txt+'</span>';

        var that = this;
        var delta = 200 - Math.random() * 100;

        if (this.isDeleting) { delta /= 2; }

        if (!this.isDeleting && this.txt === fullTxt) {
        delta = this.period;
        this.isDeleting = true;
        } else if (this.isDeleting && this.txt === '') {
        this.isDeleting = false;
        this.loopNum++;
        delta = 500;
        }

        setTimeout(function() {
        that.tick();
        }, delta);
    };

    window.onload = function() {
        var elements = document.getElementsByClassName('typewrite');
        for (var i=0; i<elements.length; i++) {
            var toRotate = elements[i].getAttribute('data-type');
            var period = elements[i].getAttribute('data-period');
            if (toRotate) {
              new TxtType(elements[i], JSON.parse(toRotate), period);
            }
        }
        // INJECT CSS
        var css = document.createElement("style");
        css.type = "text/css";
        css.innerHTML = ".typewrite > .wrap { border-right: 0.08em solid #fff}";
        document.body.appendChild(css);
    };

Have questions? Leave us a comment below.

And if you’re interested in customizing your own website, check out the base design we used for the Ed Sheeran site.

Pin It

SHARE THIS POst

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Dolly says:

    This was an incredible tutorial! I immediately applied it to one of my website pages! thanks!

  2. Marie says:

    Great tutorial, thank you! It works perfectly. I just wonder if there is a way to delete the slash at the end of each words? I would like to only have the typewriter effect without the slash… 🙂

With hundreds (if not thousands) of fonts in the Canva library, it can take some time to find the gems among the weeds. Looking at you Awkward Chubby. Seriously. No thanks, Canva. 

Drop your email below and we'll send the Free Canva Font Pairing Guide straight to your inbox. Keep your brand looking effortlessly elegant—without wasting a precious minute.

copy + paste into your own projects

Canva Font Pairing Guide

    FREE GUIDE

    FREE GUIDE

    Meet Davey & Krista

    After building a successful photography business and launching the Rising Tide Society, one of the largest communities for creatives in the world, we decided to make helping creatives build brands that book our full-time gig. 

    We believe in chasing hard after an intentional life—one that includes fulfilling work, palm trees and blue skies, time with our sons Jack & Bennett, and—of course—wine and pizza.

    We’re here to help you as you build a brand that books so you can chase after the life you want.

    we're Davey & Krista 

    GET TO KNOW US

    SEND ME MY GUIDE

    Over a decade of design experience has helped us craft the perfect questionnaire to kick off the design process in a way that makes clients feel understood and valued.


    Grab Our Free Branding Questionnaire

    HEY DESIGNERS!

    DESIGNERS - GRAB YOUR FREE GUIDE