{"id":29677,"date":"2017-04-10T20:01:08","date_gmt":"2017-04-10T12:01:08","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=29677"},"modified":"2019-04-11T21:34:09","modified_gmt":"2019-04-11T13:34:09","slug":"anime-js-animation-library","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/anime-js-animation-library\/","title":{"rendered":"Anime.js &#8211; A Lightweight JavaScript Animation Library"},"content":{"rendered":"<p><strong>Web animation<\/strong> has come a long way. Not only can developers make any animation using a combo of CSS\/SVG\/JS, but there are <strong>dozens of free libraries<\/strong> to save time in the process.<\/p>\n<p>One of my favorites is <strong><a target=\"_blank\" href=\"http:\/\/anime-js.com\/\">Anime.js<\/a><\/strong>, a completely free, open source <strong>JavaScript animation library<\/strong>.<\/p>\n<p>This library can <strong>do it all<\/strong>. It\u2019s <strong>built on JavaScript<\/strong> but it also <strong>relies heavily on <a href=\"https:\/\/www.hongkiat.com\/blog\/creative-css-animations\/\">CSS animations<\/a><\/strong>. You can target individual page elements <strong>via the DOM<\/strong> or you can even target <strong>custom SVGs<\/strong>.<\/p>\n<p class=\"note\"> <strong>Read Also:<\/strong> <a href=\"https:\/\/www.hongkiat.com\/blog\/javascript-libraries-animate-svg\/\">8 JavaScript Libraries to Animate SVG<\/a><\/p>\n<p>All the documentation is <strong>self-hosted <a target=\"_blank\" href=\"https:\/\/github.com\/juliangarnier\/anime\">on GitHub<\/a><\/strong>, so you may need to scroll to find exactly what you\u2019re looking for. But each animation feature <strong>comes with a few parameters<\/strong> such as delay, duration, and easing.<\/p>\n<p>Note this library <strong>doesn\u2019t come<\/strong> with many default animation styles. Anime.js is <strong>made for developers<\/strong> who want to customize their animations <strong>without writing verbose code<\/strong>.<\/p>\n<p>For a <strong>live example<\/strong>, check out the <a target=\"_blank\" href=\"https:\/\/codepen.io\/\/juliangarnier\/pen\/vKyLRw?editors=0010\" rel=\"nofollow\">Codepen pen below<\/a>. The code is <strong>exceedingly simple<\/strong> but you get a believable animation with <strong>squash & stretch<\/strong> plus <strong>anticipation<\/strong>, both fundamentals of animation.<\/p>\n<p><iframe height=\"363\" scrolling=\"no\" title=\"Multiple timing values - anime.js\" src=\"https:\/\/codepen.io\/\/juliangarnier\/embed\/vKyLRw\/?height=363&theme-id=0&default-tab=result&embed-version=2\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" style=\"width: 100%;\">See the Pen <a href=\"https:\/\/codepen.io\/\/juliangarnier\/pen\/vKyLRw\/\" rel=\"nofollow\">Multiple timing values \u2013 anime.js<\/a> by Julian Garnier (<a href=\"https:\/\/codepen.io\/\/juliangarnier\" rel=\"nofollow\">@juliangarnier<\/a>) on <a href=\"https:\/\/codepen.io\/\" rel=\"nofollow\">CodePen<\/a>. <\/iframe><\/p>\n<p>A fair warning: the Anime.js library is <strong>dense<\/strong>. It\u2019s not all that hard to create a custom animation but you do need to <strong>understand some basics<\/strong> like easing and common JavaScript syntax for the callbacks & options.<\/p>\n<p>But <strong>all the information you need<\/strong> is on the <strong><a target=\"_blank\" href=\"https:\/\/github.com\/juliangarnier\/anime\">repo page<\/a><\/strong>, including <strong>lots of code samples<\/strong> and <strong>detailed documentation tables<\/strong>. And you can browse through open bug reports or check browser support which currently includes <strong>all major browsers and IE 10+<\/strong>.<\/p>\n<p>This is easily one of the best animation libraries for web developers and it should be your go-to solution for <strong>any complex web animation<\/strong>.<\/p>\n<p>To see a bunch of <strong>live examples<\/strong>, check out <a target=\"_blank\" href=\"https:\/\/codepen.io\/\/collection\/XLebem\/\" rel=\"nofollow\">this collection<\/a> of Anime.js demos hosted on CodePen. Below, I embedded <a href=\"https:\/\/codepen.io\/\/juliangarnier\/pen\/xOgyjB\" target=\"_blank\" rel=\"nofollow\">my favorite<\/a> which <strong>animates the entire logo from scratch<\/strong>, with real vivacity.<\/p>\n<p><iframe height=\"337\" scrolling=\"no\" title=\"anime.js logo animation\" src=\"https:\/\/codepen.io\/\/juliangarnier\/embed\/xOgyjB\/?height=337&theme-id=0&default-tab=result&embed-version=2\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" style=\"width: 100%;\">See the Pen <a href=\"https:\/\/codepen.io\/\/juliangarnier\/pen\/xOgyjB\/\" rel=\"nofollow\">anime.js logo animation<\/a> by Julian Garnier (<a href=\"https:\/\/codepen.io\/\/juliangarnier\" rel=\"nofollow\">@juliangarnier<\/a>) on <a href=\"https:\/\/codepen.io\/\" rel=\"nofollow\">CodePen<\/a>. <\/iframe><\/p>\n<p class=\"note\"> <strong>Read Also:<\/strong> <a href=\"https:\/\/www.hongkiat.com\/blog\/css3-animation-tools\/\">10 CSS3 Animation Tools You Should Bookmark<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Web animation has come a long way. Not only can developers make any animation using a combo of CSS\/SVG\/JS, but there are dozens of free libraries to save time in the process. One of my favorites is Anime.js, a completely free, open source JavaScript animation library. This library can do it all. It\u2019s built on&hellip;<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3393],"tags":[3497,511],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Anime.js - A Lightweight JavaScript Animation Library - Hongkiat<\/title>\n<meta name=\"description\" content=\"Web animation has come a long way. Not only can developers make any animation using a combo of CSS\/SVG\/JS, but there are dozens of free libraries to save\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/anime-js-animation-library\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Anime.js - A Lightweight JavaScript Animation Library\" \/>\n<meta property=\"og:description\" content=\"Web animation has come a long way. Not only can developers make any animation using a combo of CSS\/SVG\/JS, but there are dozens of free libraries to save\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/anime-js-animation-library\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2017-04-10T12:01:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-11T13:34:09+00:00\" \/>\n<meta name=\"author\" content=\"Jake Rocheleau\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jake Rocheleau\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/anime-js-animation-library\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/anime-js-animation-library\\\/\"},\"author\":{\"name\":\"Jake Rocheleau\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/966b2daea15283b4145e71aa98a82c2a\"},\"headline\":\"Anime.js &#8211; A Lightweight JavaScript Animation Library\",\"datePublished\":\"2017-04-10T12:01:08+00:00\",\"dateModified\":\"2019-04-11T13:34:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/anime-js-animation-library\\\/\"},\"wordCount\":365,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"keywords\":[\"Javascript Library\",\"Web Developers\"],\"articleSection\":[\"Toolkit\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/anime-js-animation-library\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/anime-js-animation-library\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/anime-js-animation-library\\\/\",\"name\":\"Anime.js - A Lightweight JavaScript Animation Library - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"datePublished\":\"2017-04-10T12:01:08+00:00\",\"dateModified\":\"2019-04-11T13:34:09+00:00\",\"description\":\"Web animation has come a long way. Not only can developers make any animation using a combo of CSS\\\/SVG\\\/JS, but there are dozens of free libraries to save\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/anime-js-animation-library\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/anime-js-animation-library\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/anime-js-animation-library\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Anime.js &#8211; A Lightweight JavaScript Animation Library\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/966b2daea15283b4145e71aa98a82c2a\",\"name\":\"Jake Rocheleau\",\"description\":\"Jake is a writer and designer with over 10 years experience working on the web. He writes about user experience design and cool resources for designers\",\"sameAs\":[\"https:\\\/\\\/www.hongkiat.com\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/jake\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Anime.js - A Lightweight JavaScript Animation Library - Hongkiat","description":"Web animation has come a long way. Not only can developers make any animation using a combo of CSS\/SVG\/JS, but there are dozens of free libraries to save","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/anime-js-animation-library\/","og_locale":"en_US","og_type":"article","og_title":"Anime.js - A Lightweight JavaScript Animation Library","og_description":"Web animation has come a long way. Not only can developers make any animation using a combo of CSS\/SVG\/JS, but there are dozens of free libraries to save","og_url":"https:\/\/www.hongkiat.com\/blog\/anime-js-animation-library\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2017-04-10T12:01:08+00:00","article_modified_time":"2019-04-11T13:34:09+00:00","author":"Jake Rocheleau","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Jake Rocheleau","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/anime-js-animation-library\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/anime-js-animation-library\/"},"author":{"name":"Jake Rocheleau","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/966b2daea15283b4145e71aa98a82c2a"},"headline":"Anime.js &#8211; A Lightweight JavaScript Animation Library","datePublished":"2017-04-10T12:01:08+00:00","dateModified":"2019-04-11T13:34:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/anime-js-animation-library\/"},"wordCount":365,"commentCount":1,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"keywords":["Javascript Library","Web Developers"],"articleSection":["Toolkit"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/anime-js-animation-library\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/anime-js-animation-library\/","url":"https:\/\/www.hongkiat.com\/blog\/anime-js-animation-library\/","name":"Anime.js - A Lightweight JavaScript Animation Library - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"datePublished":"2017-04-10T12:01:08+00:00","dateModified":"2019-04-11T13:34:09+00:00","description":"Web animation has come a long way. Not only can developers make any animation using a combo of CSS\/SVG\/JS, but there are dozens of free libraries to save","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/anime-js-animation-library\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/anime-js-animation-library\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/anime-js-animation-library\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Anime.js &#8211; A Lightweight JavaScript Animation Library"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/966b2daea15283b4145e71aa98a82c2a","name":"Jake Rocheleau","description":"Jake is a writer and designer with over 10 years experience working on the web. He writes about user experience design and cool resources for designers","sameAs":["https:\/\/www.hongkiat.com"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/jake\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-7IF","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/29677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=29677"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/29677\/revisions"}],"predecessor-version":[{"id":47372,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/29677\/revisions\/47372"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=29677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=29677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=29677"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=29677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}