{"id":27989,"date":"2022-07-11T08:54:09","date_gmt":"2022-07-11T08:54:09","guid":{"rendered":"http:\/\/manage-image-animations-in-nuxtjs"},"modified":"2025-03-02T05:16:16","modified_gmt":"2025-03-02T13:16:16","slug":"manage-image-animations-in-nuxtjs","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/","title":{"rendered":"Manage Image Animations in NuxtJS"},"content":{"rendered":"<div class=\"wp-block-cloudinary-markdown \"><p>Animations are a powerful way to add motion to the user interface. The moving of elements is possible with animations, as well as their appearance and disappearance.<\/p>\n<p>This post will teach us how to manage image animations using the Nuxt.js inbuilt animations element.<\/p>\n<h2>Sandbox<\/h2>\n<p>We completed this project in a <a href=\"https:\/\/codesandbox.io\/s\/divine-thunder-vsmmwg?from-embed\">Code<\/a><a href=\"https:\/\/codesandbox.io\/s\/divine-thunder-vsmmwg?from-embed\">S<\/a><a href=\"https:\/\/codesandbox.io\/s\/divine-thunder-vsmmwg\">andbox<\/a>. Fork and run it to quickly get started.<\/p>\n<\/div>\n  \n  <div class=\"wp-block-cloudinary-code-sandbox \">\n    <iframe\n      src=\"https:\/\/codesandbox.io\/embed\/divine-thunder-vsmmwg?theme=dark&amp;codemirror=1&amp;highlights=&amp;editorsize=50&amp;fontsize=14&amp;expanddevtools=0&amp;hidedevtools=0&amp;eslint=0&amp;forcerefresh=0&amp;hidenavigation=0&amp;initialpath=%2F&amp;module=&amp;moduleview=0&amp;previewwindow=&amp;view=&amp;runonclick=1\"\n      height=\"500\"\n      style=\"width: 100%;\"\n      title=\"Manage image animations in Nuxt\"\n      loading=\"lazy\"\n      allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n      sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n    ><\/iframe>\n  <\/div>\n\n  <div class=\"wp-block-cloudinary-markdown \"><h2>GitHub repository<\/h2>\n<p><a href=\"https:\/\/github.com\/Olanetsoft\/Manage-image-animations-in-Nuxt.js\">https:\/\/github.com\/Olanetsoft\/Manage-image-animations-in-Nuxt.js<\/a><\/p>\n<h1>Getting Started with Nuxt.js<\/h1>\n<p><a href=\"https:\/\/nuxtjs.org\/\">Nuxtjs<\/a> is the bedrock of our Vue.js project, providing structure and flexibility while allowing us to scale confidently.<\/p>\n<p>It is extensible, offering a robust module ecosystem and hooks engine that makes it simple to integrate our REST or GraphQL endpoints, favorite CMS, CSS frameworks, and many other third-party applications.<\/p>\n<h1>Project Setup and Installation<\/h1>\n<p>To create a new project, we will use the command below to scaffold a new project:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\">    npx create-nuxt-app <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">project-name<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>A series of prompts will appear as a result of the command. Here are the defaults we recommend:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_4555F16D6E2325FC80B70C08DE7C0A9E918CB5381AF3580EB61B7C709FED2661_1655929480466_Screenshot+2022-06-19+at+12.23.48.png\" alt=\"Manage image animations in Nuxtjs\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"1286\" height=\"416\"\/><\/p>\n<p>The command creates a Nuxt.js project with TailwindCSS called <code>video-ad-nuxtjs<\/code>.<\/p>\n<p><a href=\"https:\/\/tailwindcss.com\/\">TailwindCSS<\/a> is a CSS framework containing a lot of classes to help us customize our website\u2019s style.<\/p>\n<p>Next, we navigate to the project directory and start the development server using the command below.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\">    cd <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">project<\/span> <span class=\"hljs-attr\">name<\/span>&gt;<\/span> &amp;&amp; yarn dev\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>Nuxt.js will start a hot-reloading development environment accessible by default at <a href=\"http:\/\/localhost:3000\">http:\/\/localhost:3000<\/a><\/p>\n<p>We proceed to install the <a href=\"https:\/\/cloudinary.nuxtjs.org\/\">@nuxtjs\/cloudinary<\/a> dependency with:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css shcb-wrap-lines\">    <span class=\"hljs-selector-tag\">npm<\/span> <span class=\"hljs-selector-tag\">install<\/span> <span class=\"hljs-keyword\">@nuxtjs<\/span>\/cloudinary\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<h1>Configuring Cloudinary in Nuxt.js<\/h1>\n<p>First, we need to modify the <code>nuxt.config.js<\/code> file by adding <code>@nuxtjs\/cloudinary<\/code> as a module in the modules section:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">    modules: &#91;\n        <span class=\"hljs-string\">'@nuxtjs\/cloudinary'<\/span>, <span class=\"hljs-comment\">\/\/add this<\/span>\n      ],\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>Next, we need to configure Cloudinary by adding a <code>cloudinary<\/code> section below the <code>modules<\/code> section as shown below:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">    modules: &#91;\n        <span class=\"hljs-string\">'@nuxtjs\/cloudinary'<\/span>,\n      ],\n    \n    <span class=\"hljs-comment\">\/\/ add this<\/span>\n    <span class=\"hljs-attr\">cloudinary<\/span>: {\n        <span class=\"hljs-attr\">cloudName<\/span>: <span class=\"hljs-string\">'&lt;your-cloud-name&gt;'<\/span>,\n        <span class=\"hljs-attr\">useComponent<\/span>: <span class=\"hljs-literal\">true<\/span>,\n    },\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>The <code>useComponent<\/code> flag set to <code>true<\/code> lets us use the built-in Cloudinary components. Our <code>cloud name<\/code> is obtained from our Cloudinary <a href=\"https:\/\/cloudinary.com\/console\/\">dashboard<\/a>.<\/p>\n<h1>Building the Image Animations<\/h1>\n<p>We can start building the image animations with our project fully set up and configured.<\/p>\n<p>Inside the <code>index.vue<\/code> file let\u2019s update it with the following code snippet to set up our layout for the project.<\/p>\n<p><a href=\"https:\/\/gist.github.com\/Olanetsoft\/dc0639196babd4eb602b35e87d7a3c63\">https:\/\/gist.github.com\/Olanetsoft\/dc0639196babd4eb602b35e87d7a3c63<\/a><\/p>\n<p><a href=\"https:\/\/gist.github.com\/Olanetsoft\/dc0639196babd4eb602b35e87d7a3c63\">https:\/\/gist.github.com\/Olanetsoft\/dc0639196babd4eb602b35e87d7a3c63<\/a><\/p>\n<p>Let\u2019s open our browser, we should see something similar to the image below.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_4555F16D6E2325FC80B70C08DE7C0A9E918CB5381AF3580EB61B7C709FED2661_1655970328063_Screenshot+2022-06-23+at+10.44.46.png\" alt=\"Manage image animations in Nuxt.js\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"2000\" height=\"1117\"\/><\/p>\n<p>In the following section, we will implement how to manage image animations in Nuxt.js using the <code>Class-based Animations<\/code>, <code>Built-in Transition (Toggle &amp; Fade)<\/code>,  <code>CSS Transitions (Slide &amp; Fade)<\/code>,  <code>CSS Animations (Bounce)<\/code>, and <code>Custom Transition Classes<\/code>.<\/p>\n<p><strong>Class-Based Animations<\/strong><\/p>\n<p>We can start animations for components that aren\u2019t entering or leaving the DOM by dynamically adding a CSS class with the following code snippet:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\">    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">template<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span>\n        <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"relative flex items-top justify-center min-h-screen bg-gray-100 sm:items-center sm:pt-0\"<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"max-w-4xl mx-auto sm:px-6 lg:px-8 mb-8\"<\/span>&gt;<\/span>\n          \/\/...\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"mt-8 bg-white overflow-hidden shadow sm:rounded-lg p-6\"<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h2<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"text-lg leading-6 font-medium text-gray-900\"<\/span>&gt;<\/span>\n              Class-based Animations\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h2<\/span>&gt;<\/span>\n    \n            <span class=\"hljs-comment\">&lt;!-- Update the div class --&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">:class<\/span>=<span class=\"hljs-string\">\"{ shake }\"<\/span>&gt;<\/span> \n              <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">button<\/span>\n                @<span class=\"hljs-attr\">click<\/span>=<span class=\"hljs-string\">\"shake = !shake\"<\/span> \/\/ <span class=\"hljs-attr\">Add<\/span> <span class=\"hljs-attr\">this<\/span>\n                \/\/<span class=\"hljs-attr\">...<\/span>\n              &gt;<\/span>\n                Click me (Shake)!\n              <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">button<\/span>&gt;<\/span>\n    \n              <span class=\"hljs-comment\">&lt;!-- Add this --&gt;<\/span>\n              <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">cld-image<\/span>\n                <span class=\"hljs-attr\">public-id<\/span>=<span class=\"hljs-string\">\"\/samples\/people\/boy-snow-hoodie.jpg\"<\/span>\n                <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"mt-3\"<\/span>\n              &gt;<\/span>\n              <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">cld-image<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n          \/\/...\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">template<\/span>&gt;<\/span>\n    \n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span>&gt;<\/span><span class=\"javascript\">\n    <span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> {\n      <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">\"IndexPage\"<\/span>,\n      data() {\n        <span class=\"hljs-keyword\">return<\/span> {\n          <span class=\"hljs-attr\">shake<\/span>: <span class=\"hljs-literal\">false<\/span>,\n        };\n      },\n    };\n    <\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>In the code snippet above, we;<\/p>\n<ul>\n<li>Created a <code>shake<\/code> state variable with a default set to <code>false<\/code>\n<\/li>\n<li>Updated the class in the <code>div<\/code> referencing the <code>shake<\/code> state variable<\/li>\n<li>Added the <code>@click<\/code> attribute to the button to set the value of the state variable when it\u2019s clicked<\/li>\n<li>Added a Cloudinary image with a <code>public-id<\/code> of our choice<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_4555F16D6E2325FC80B70C08DE7C0A9E918CB5381AF3580EB61B7C709FED2661_1655972141067_shake.gif\" alt=\"Class-based Animations\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"640\" height=\"358\"\/><\/p>\n<p><strong>Built-In Transition (Toggle &amp; Fade)<\/strong><\/p>\n<p>In this section, we\u2019ll use the built-in <code>&lt;Transition&gt;<\/code> component to implement the built-in transition with toggle and fade capability. It doesn\u2019t need to be registered because it is accessible in any component\u2019s template. It is possible to apply enter and exit animations to elements or parts supplied to it via its default slot.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\">    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">template<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span>\n        <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"relative flex items-top justify-center min-h-screen bg-gray-100 sm:items-center sm:pt-0\n        \"<\/span>\n      &gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"max-w-4xl mx-auto sm:px-6 lg:px-8 mb-8\"<\/span>&gt;<\/span>\n          \/\/...\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"mt-8 bg-white overflow-hidden shadow sm:rounded-lg p-6\"<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h2<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"text-lg leading-6 font-medium text-gray-900\"<\/span>&gt;<\/span>\n              Built-in Transition (Toggle &amp; Fade)\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h2<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">button<\/span>\n              @<span class=\"hljs-attr\">click<\/span>=<span class=\"hljs-string\">\"tFade = !tFade\"<\/span> \/\/ <span class=\"hljs-attr\">Add<\/span> <span class=\"hljs-attr\">this<\/span>\n             \/\/<span class=\"hljs-attr\">...<\/span>\n            &gt;<\/span>\n              Click me, I will toggle + Fade!\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">button<\/span>&gt;<\/span>\n    \n          <span class=\"hljs-comment\">&lt;!-- Add this --&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">Transition<\/span>&gt;<\/span>\n              <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">cld-image<\/span>\n                <span class=\"hljs-attr\">v-if<\/span>=<span class=\"hljs-string\">\"tFade\"<\/span>\n                <span class=\"hljs-attr\">public-id<\/span>=<span class=\"hljs-string\">\"\/samples\/people\/group-picture.jpg\"<\/span>\n                <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"mt-3\"<\/span>\n              &gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">cld-image<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">Transition<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n          \/\/...\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">template<\/span>&gt;<\/span>\n    \n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span>&gt;<\/span><span class=\"javascript\">\n    <span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> {\n      <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">\"IndexPage\"<\/span>,\n      data() {\n        <span class=\"hljs-keyword\">return<\/span> {\n          <span class=\"hljs-comment\">\/\/...<\/span>\n          <span class=\"hljs-attr\">tFade<\/span>: <span class=\"hljs-literal\">true<\/span>,\n        };\n      },\n    };\n    <\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>In the code snippet above, we;<\/p>\n<ul>\n<li>Created a <code>tFade<\/code> state variable with a default value of <code>true<\/code>\n<\/li>\n<li>Added the <code>@click<\/code> attribute to the button to set the value of the state variable when it\u2019s clicked<\/li>\n<li>Added a Cloudinary image with a <code>public-id<\/code> of our choice wrapped with the built-in <code>&lt;Transition&gt;<\/code> component<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_4555F16D6E2325FC80B70C08DE7C0A9E918CB5381AF3580EB61B7C709FED2661_1655973152996_fade.gif\" alt=\"Built-in Transition (Toggle &amp; Fade)\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"640\" height=\"358\"\/><\/p>\n<p><strong>CSS Transitions (Slide &amp; Fade)<\/strong><\/p>\n<p>With the help of the transition CSS property, we can quickly describe various transitional elements, such as the attributes that should be animated, the length of the transition, and easing curves.<\/p>\n<p>Another example of many attributes transitioning is seen here, with distinct durations and softening curves for entry and exit.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\">    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">template<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span>\n        <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"relative flex items-top justify-center min-h-screen bg-gray-100 sm:items-center sm:pt-0\"<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"max-w-4xl mx-auto sm:px-6 lg:px-8 mb-8\"<\/span>&gt;<\/span>\n          \/\/...\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"mt-8 bg-white overflow-hidden shadow sm:rounded-lg p-6\"<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h2<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"text-lg leading-6 font-medium text-gray-900\"<\/span>&gt;<\/span>\n              CSS Transitions (Slide &amp; Fade)\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h2<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">button<\/span>\n            @<span class=\"hljs-attr\">click<\/span>=<span class=\"hljs-string\">\"sFade = !sFade\"<\/span> \/\/ <span class=\"hljs-attr\">Add<\/span> <span class=\"hljs-attr\">this<\/span>\n              \/\/<span class=\"hljs-attr\">...<\/span>\n            &gt;<\/span>\n              Click me to toggle Slide + Fade!\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">button<\/span>&gt;<\/span>\n    \n            <span class=\"hljs-comment\">&lt;!-- Add this --&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">Transition<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"slide-fade\"<\/span>&gt;<\/span>\n              <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">cld-image<\/span>\n                <span class=\"hljs-attr\">v-if<\/span>=<span class=\"hljs-string\">\"sFade\"<\/span>\n                <span class=\"hljs-attr\">public-id<\/span>=<span class=\"hljs-string\">\"\/samples\/people\/group-picture-3.jpg\"<\/span>\n                <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"mt-3\"<\/span>\n              &gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">cld-image<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">Transition<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">template<\/span>&gt;<\/span>\n    \n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span>&gt;<\/span><span class=\"javascript\">\n    <span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> {\n      <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">\"IndexPage\"<\/span>,\n      data() {\n        <span class=\"hljs-keyword\">return<\/span> {\n          <span class=\"hljs-comment\">\/\/...<\/span>\n          <span class=\"hljs-attr\">sFade<\/span>: <span class=\"hljs-literal\">true<\/span>,\n        };\n      },\n    };\n    <\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>In the code snippet above, we;<\/p>\n<ul>\n<li>Created <code>sFade<\/code> state variable with a default value of <code>true<\/code>\n<\/li>\n<li>Added an <code>@click<\/code> attribute to the button to set the value of the state variable when it is clicked<\/li>\n<li>Added a Cloudinary image with a <code>public-id<\/code> of our choice wrapped with the built-in <code>&lt;Transition&gt;<\/code> component and an attribute of <code>name=``&quot;``slide-fade``&quot;<\/code>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_4555F16D6E2325FC80B70C08DE7C0A9E918CB5381AF3580EB61B7C709FED2661_1655992374998_sfade.gif\" alt=\"CSS Transitions (Slide &amp; Fade)\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"640\" height=\"358\"\/><\/p>\n<p><strong>CSS Animations (Bounce)<\/strong><\/p>\n<p>In this section, we will experiment with the bounce functionality using the CSS animation with the following code snippet.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\">    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">template<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span>\n        <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"relative flex items-top justify-center min-h-screen bg-gray-100 sm:items-center sm:pt-0\"<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"max-w-4xl mx-auto sm:px-6 lg:px-8 mb-8\"<\/span>&gt;<\/span>\n         \/\/...\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"mt-8 bg-white overflow-hidden shadow sm:rounded-lg p-6\"<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h2<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"text-lg leading-6 font-medium text-gray-900\"<\/span>&gt;<\/span>\n              CSS Animations (Bounce)\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h2<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">button<\/span>\n            @<span class=\"hljs-attr\">click<\/span>=<span class=\"hljs-string\">\"bounce = !bounce\"<\/span> \/\/ <span class=\"hljs-attr\">Add<\/span> <span class=\"hljs-attr\">this<\/span>\n             \/\/<span class=\"hljs-attr\">...<\/span>\n            &gt;<\/span>\n              Click me to toggle Bounce!\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">button<\/span>&gt;<\/span>\n    \n          <span class=\"hljs-comment\">&lt;!-- Add this --&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">Transition<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"bounce\"<\/span>&gt;<\/span>\n              <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">cld-image<\/span>\n                <span class=\"hljs-attr\">v-if<\/span>=<span class=\"hljs-string\">\"bounce\"<\/span>\n                <span class=\"hljs-attr\">public-id<\/span>=<span class=\"hljs-string\">\"\/samples\/people\/jazz.jpg\"<\/span>\n                <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"mt-3\"<\/span>\n              &gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">cld-image<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">Transition<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">template<\/span>&gt;<\/span>\n    \n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span>&gt;<\/span><span class=\"javascript\">\n    <span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> {\n      <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">\"IndexPage\"<\/span>,\n      data() {\n        <span class=\"hljs-keyword\">return<\/span> {\n          <span class=\"hljs-comment\">\/\/...<\/span>\n          <span class=\"hljs-attr\">bounce<\/span>: <span class=\"hljs-literal\">true<\/span>,\n        };\n      },\n    };\n    <\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>In the code snippet above, we;<\/p>\n<ul>\n<li>Created a <code>bounce<\/code> state variable with a default value of <code>true<\/code>\n<\/li>\n<li>Added an <code>@click<\/code> attribute to the button to set the value of the state variable when it is clicked<\/li>\n<li>Added a Cloudinary image with a <code>public-id<\/code> of our choice wrapped with the built-in <code>&lt;Transition&gt;<\/code> component and an attribute of <code>name=&quot;bounce&quot;<\/code>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_4555F16D6E2325FC80B70C08DE7C0A9E918CB5381AF3580EB61B7C709FED2661_1655992891198_bounce.gif\" alt=\"CSS Animations (Bounce)\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"640\" height=\"358\"\/><\/p>\n<p><strong>Custom Transition Classes<\/strong><\/p>\n<p>The code snippet below shows how to pass the <code>enter-from-class<\/code> and <code>enter-active-class<\/code> props to the <code>Transition<\/code> component to specify custom transition classes.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\">    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">template<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span>\n        <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"relative flex items-top justify-center min-h-screen bg-gray-100 sm:items-center sm:pt-0\"<\/span>&gt;<\/span>\n          \/\/...\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"mt-8 bg-white overflow-hidden shadow sm:rounded-lg p-6\"<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h2<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"text-lg leading-6 font-medium text-gray-900\"<\/span>&gt;<\/span>\n              Custom Transition Classes\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h2<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">button<\/span>\n            @<span class=\"hljs-attr\">click<\/span>=<span class=\"hljs-string\">\"show = !show\"<\/span> \/\/ <span class=\"hljs-attr\">Add<\/span> <span class=\"hljs-attr\">this<\/span>\n            \/\/<span class=\"hljs-attr\">...<\/span>\n            &gt;<\/span>\n              Click me to toggle!\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">button<\/span>&gt;<\/span>\n    \n            <span class=\"hljs-comment\">&lt;!-- Add this --&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">Transition<\/span>\n              <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"custom-classes\"<\/span>\n              <span class=\"hljs-attr\">enter-active-class<\/span>=<span class=\"hljs-string\">\"animate__animated animate__tada\"<\/span>\n              <span class=\"hljs-attr\">leave-active-class<\/span>=<span class=\"hljs-string\">\"animate__animated animate__bounceOutRight\"<\/span>\n            &gt;<\/span>\n              <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">cld-image<\/span>\n                <span class=\"hljs-attr\">v-if<\/span>=<span class=\"hljs-string\">\"show\"<\/span>\n                <span class=\"hljs-attr\">public-id<\/span>=<span class=\"hljs-string\">\"\/samples\/people\/smiling-man.jpg\"<\/span>\n                <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"mt-3\"<\/span>\n              &gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">cld-image<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">Transition<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">template<\/span>&gt;<\/span>\n    \n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span>&gt;<\/span><span class=\"javascript\">\n    <span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> {\n      <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">\"IndexPage\"<\/span>,\n      data() {\n        <span class=\"hljs-keyword\">return<\/span> {\n          <span class=\"hljs-comment\">\/\/...<\/span>\n          <span class=\"hljs-attr\">show<\/span>: <span class=\"hljs-literal\">true<\/span>,\n        };\n      },\n    };\n    <\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>In the code snippet above, we;<\/p>\n<ul>\n<li>Created a <code>show<\/code> state variable with a default value of <code>true<\/code>\n<\/li>\n<li>Added an <code>@click<\/code> attribute to the button to set the value of the state variable when it is clicked<\/li>\n<li>Added a Cloudinary image with a <code>public-id<\/code> of our choice wrapped with the built-in <code>&lt;Transition&gt;<\/code> component and an attribute of <code>name=&quot;custom-classes&quot;<\/code>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_4555F16D6E2325FC80B70C08DE7C0A9E918CB5381AF3580EB61B7C709FED2661_1655993441853_t.gif\" alt=\"Custom Transition Classes\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"640\" height=\"358\"\/><\/p>\n<h1>Conclusion<\/h1>\n<p>This post demonstrated how to manage image animations in Nuxt.js.<\/p>\n<h1>Resources<\/h1>\n<p>You may also find these resources helpful.<\/p>\n<ul>\n<li>\n<a href=\"https:\/\/vuejs.org\/guide\/extras\/animation.html\">Animation techniques<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/cloudinary.com\/documentation\">Cloudinary Documentation<\/a>\n<\/li>\n<\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":41,"featured_media":27990,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[134,370,177,372,371],"class_list":["post-27989","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-guest-post","tag-image","tag-javascript","tag-nuxtjs","tag-under-review"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Manage Image Animations in NuxtJS<\/title>\n<meta name=\"description\" content=\"This post demonstrated how to manage image animations in Nuxt.js.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Manage Image Animations in NuxtJS\" \/>\n<meta property=\"og:description\" content=\"This post demonstrated how to manage image animations in Nuxt.js.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-11T08:54:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-02T13:16:16+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925741\/Web_Assets\/blog\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1.jpg?_i=AA\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Manage Image Animations in NuxtJS\",\"datePublished\":\"2022-07-11T08:54:09+00:00\",\"dateModified\":\"2025-03-02T13:16:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/\"},\"wordCount\":5,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925741\/Web_Assets\/blog\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1.jpg?_i=AA\",\"keywords\":[\"Guest Post\",\"Image\",\"Javascript\",\"NuxtJS\",\"Under Review\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2022\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/\",\"url\":\"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/\",\"name\":\"Manage Image Animations in NuxtJS\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925741\/Web_Assets\/blog\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1.jpg?_i=AA\",\"datePublished\":\"2022-07-11T08:54:09+00:00\",\"dateModified\":\"2025-03-02T13:16:16+00:00\",\"description\":\"This post demonstrated how to manage image animations in Nuxt.js.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925741\/Web_Assets\/blog\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1.jpg?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925741\/Web_Assets\/blog\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1.jpg?_i=AA\",\"width\":5626,\"height\":3751},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Manage Image Animations in NuxtJS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Manage Image Animations in NuxtJS","description":"This post demonstrated how to manage image animations in Nuxt.js.","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:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/","og_locale":"en_US","og_type":"article","og_title":"Manage Image Animations in NuxtJS","og_description":"This post demonstrated how to manage image animations in Nuxt.js.","og_url":"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/","og_site_name":"Cloudinary Blog","article_published_time":"2022-07-11T08:54:09+00:00","article_modified_time":"2025-03-02T13:16:16+00:00","twitter_card":"summary_large_image","twitter_image":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925741\/Web_Assets\/blog\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1.jpg?_i=AA","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/"},"author":{"name":"","@id":""},"headline":"Manage Image Animations in NuxtJS","datePublished":"2022-07-11T08:54:09+00:00","dateModified":"2025-03-02T13:16:16+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/"},"wordCount":5,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925741\/Web_Assets\/blog\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1.jpg?_i=AA","keywords":["Guest Post","Image","Javascript","NuxtJS","Under Review"],"inLanguage":"en-US","copyrightYear":"2022","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/","url":"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/","name":"Manage Image Animations in NuxtJS","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925741\/Web_Assets\/blog\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1.jpg?_i=AA","datePublished":"2022-07-11T08:54:09+00:00","dateModified":"2025-03-02T13:16:16+00:00","description":"This post demonstrated how to manage image animations in Nuxt.js.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925741\/Web_Assets\/blog\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1.jpg?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925741\/Web_Assets\/blog\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1.jpg?_i=AA","width":5626,"height":3751},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/manage-image-animations-in-nuxtjs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Manage Image Animations in NuxtJS"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":""}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925741\/Web_Assets\/blog\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1\/cd48aa7600bb26c08123bc2151ec073caad21c55-5626x3751-1_27990d3bc1.jpg?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27989","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=27989"}],"version-history":[{"count":1,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27989\/revisions"}],"predecessor-version":[{"id":37058,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27989\/revisions\/37058"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/27990"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=27989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=27989"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=27989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}