script typed code example

Example 1: typed js

yarn add typed.js
// or
npm install typed.js
// or
bower install typed.js

// in js file:
import Typed from 'typed.js';

const options = {
  strings: ['<i>First</i> sentence.', '& a second sentence.'],
  typeSpeed: 40
};

const typed = new Typed('.element', options);

Example 2: typedjs

// Can also be included with a regular script tag
import Typed from 'typed.js';

var options = {
  strings: ['<i>First</i> sentence.', '& a second sentence.'],
  typeSpeed: 40
};

var typed = new Typed('.element', options);