{"id":4815,"date":"2020-08-28T18:17:00","date_gmt":"2020-08-28T18:17:00","guid":{"rendered":"https:\/\/azoora.com\/blog\/?p=4815"},"modified":"2020-08-17T18:23:17","modified_gmt":"2020-08-17T18:23:17","slug":"tiper-js-modern-typing-animation-javascript-library","status":"publish","type":"post","link":"https:\/\/azoora.com\/blog\/code\/tiper-js-modern-typing-animation-javascript-library\/","title":{"rendered":"Tiper-js: Modern Typing Animation JavaScript Library"},"content":{"rendered":"\n<h2>Description:<\/h2>\n\n\n\n<p>tiper-js is a modern JavaScript component to print any text with a typing animation just like the commands and output in a terminal.<\/p>\n\n\n\n<h2>How to use it:<\/h2>\n\n\n\n<p>1. Install and Import the tiper-js as an ES module.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># NPM\n$ npm i tiper-js --save<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">import Tiper from \"tiper-js\";<\/pre>\n\n\n\n<p>2. Create a container in which you want to print the text.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;div class=\"tiper-js-container\"&gt;&lt;\/div&gt;<\/pre>\n\n\n\n<p>3. Initialize the tiper-js library and determine the text you want to print out.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">let tiper = new Tiper(\n    document.querySelector(\".tiper-js-container\"),\n    {\n      text: `Any Text Here`\n    }\n);<\/pre>\n\n\n\n<p>4. Start the typing animation.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">tiper.beginTyping();<\/pre>\n\n\n\n<p>5. Type more text.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">tiper.line('More Text');<\/pre>\n\n\n\n<p>6. Stop the typing animation.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">tiper.stopTyping();<\/pre>\n\n\n\n<p>7. Add a blinking cursor to the end of the text while typing.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">.tiper-js-caret.blinking{\n  animation: blinking 1s infinite steps(2, start); \n}\n\n@keyframes blinking{\n  to{\n    visibility: hidden;\n  }\n}<\/pre>\n\n\n\n<p>8. All configuration options with default values.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">let tiper = new Tiper(\n    document.querySelector(\".tiper-js-container\"),\n    {\n      text: \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus tempus sagittis dapibus. Fusce lacinia dui tortor, at porttitor quam luctus ut. Aliquam gravida commodo eros ac dictum. Nam ac odio at sem interdum dictum eget sit amet lorem. Vivamus enim velit, condimentum sed neque non, dignissim viverra nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Duis sodales, neque eget tincidunt efficitur, nisi orci vestibulum diam, eget fringilla dui dolor sed nisi. Pellentesque feugiat augue in felis interdum, non tempus dui volutpat. Sed pulvinar, massa non placerat scelerisque, nunc tellus posuere felis, a ultricies mi libero id velit. Mauris sed arcu dolor. Mauris varius a metus sit amet pulvinar. Proin rhoncus non quam in vulputate. \",\n      hesitation: 0.45, \/\/ used as a factor in determining the delay between typing the next character\n      wordsPerMinute: 40,\n      pauseTimeout: 525,\n      pauseOnSpace: false,\n      pauseOnEndOfSentence: true,\n      showCaret: false,\n      caretType: \"normal\", \/\/ 'normal' or 'underscore'\n      glitch: false, \/\/  show glitch effect\n      onFinishedTyping: function () {\n        console.log(\"Finished typing!\");\n      },\n    }\n);<\/pre>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><strong>Author<\/strong>: carlelieser<\/p><p><strong>License<\/strong>: MIT<\/p><p><strong>Official Page<\/strong>: <a href=\"https:\/\/github.com\/carlelieser\/tiper-js\">GitHub<\/a><\/p><p><strong>Download<\/strong>: <a href=\"https:\/\/github.com\/carlelieser\/tiper-js\/archive\/master.zip\">Link<\/a><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Description: tiper-js is a modern JavaScript component to print any text with a typing animation just like the commands and output in a terminal. How to use it: 1. Install and Import the tiper-js as an ES module. # NPM $ npm i tiper-js &#8211;save import Tiper from &#8220;tiper-js&#8221;; 2. Create a container in which [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":4816,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[4,145,12],"tags":[25,146,87,90],"jetpack_featured_media_url":"https:\/\/azoora.com\/blog\/wp-content\/uploads\/2020\/08\/Modern-Typing-Animation-JavaScript-Library-tiper-js.png","jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p7FQPL-1fF","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/posts\/4815"}],"collection":[{"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/comments?post=4815"}],"version-history":[{"count":1,"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/posts\/4815\/revisions"}],"predecessor-version":[{"id":4817,"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/posts\/4815\/revisions\/4817"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/media\/4816"}],"wp:attachment":[{"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/media?parent=4815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/categories?post=4815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/azoora.com\/blog\/wp-json\/wp\/v2\/tags?post=4815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}