Title: Animations for Blocks
Author: ska-dev
Published: <strong>24 Agosto 2021</strong>
Last modified: 20 Maggio 2026

---

Ricerca i plugin

![](https://ps.w.org/animations-for-blocks/assets/icon-256x256.png?rev=2587511)

# Animations for Blocks

 Di [ska-dev](https://profiles.wordpress.org/skadev/)

[Scarica](https://downloads.wordpress.org/plugin/animations-for-blocks.1.2.6.zip)

[Anteprima in tempo reale](https://it.wordpress.org/plugins/animations-for-blocks/?preview=1)

 * [Dettagli](https://it.wordpress.org/plugins/animations-for-blocks/#description)
 * [Recensioni](https://it.wordpress.org/plugins/animations-for-blocks/#reviews)
 *  [Installazione](https://it.wordpress.org/plugins/animations-for-blocks/#installation)
 * [Sviluppo](https://it.wordpress.org/plugins/animations-for-blocks/#developers)

 [Supporto](https://wordpress.org/support/plugin/animations-for-blocks/)

## Descrizione

Lightweight plugin that adds additional inspector controls to block editor blocks
that allow to animate the block once it becomes visible to the user during scrolling.
The controls can be used to select an animation type (fade, flip, slide, zoom), 
variation (different directions), as well as delay, duration and more advanced settings.
Upon changing an option the animation can be immediately previewed in the editor.

[Demo](https://playground.wordpress.net/?plugin=animations-for-blocks&url=%2Fwp-admin%2Fpost.php%3Fpost%3D2%26action%3Dedit)

This plugin uses [AOS – Animate on scroll library](https://github.com/michalsnik/aos)
and adds its’ stylesheet (**2.8 kB**) and script (**5.2 kB**) to the front end as
well as a script that initializes the animations (**1.3 kB**).

## Screenshot

 * [[
 * Adding an animation
 * [[
 * Animation controls

## Installazione

#### Install via admin dashboard

 1. Go to your **WordPress admin dashboard -> Plugins**.
 2. Click “Add New”.
 3. Click “Upload Plugin”.
 4. Select the `animations-for-blocks.zip` file.
 5. Click “Install Now”.
 6. Activate the plugin from **WordPress admin dashboard -> Plugins**.

#### Manual install via FTP upload

 1. Upload the folder “animations-for-blocks” from `animations-for-blocks.zip` file
    to your WordPress installations `../wp-content/plugins` folder.
 2. Activate the plugin from **WordPress admin dashboard -> Plugins**.

## FAQ

### How do I add an animation?

In your selected block’s inspector controls (block settings) open the “Animation”
panel and select an animation. The current block should display a preview of the
selected animation and further options related to that animation will become available
below.

### How does it work?

Animations for Blocks plugin works by using the Animate on Scroll (AOS) library 
that is mostly CSS-based with some JavaScript to handle initialization. The plugin
adds attributes to block’s root element that tell the AOS library how to animate
it. Loading the necessary styles and scripts is also handled automatically by the
plugin.

### Animations are not playing for me

By default the plugin will not play animations for users that have the “prefers-
reduced-motion” setting enabled for their device. This functionality can be turned
off by enabling the “Ignore reduced motion preference” plugin option, how ever it’s
not recommended. Other users that don’t have reduced motion preference enabled will
still see the animations.

### Animations cause a horizontal scrollbar

Since some elements are initially placed off-screen to then animate back to their
normal position it can cause a scrollbar to appear. To prevent this the overflow
should be hidden on one of the parent elements. Which element you should target 
is specific to your site. For example, you can try adding custom CSS: `.wp-site-
blocks { overflow: hidden; }`, but you have to make sure that this doesn’t break
any other features on your site that require overflow being visible.

### Does it work for all blocks?

It should work with normal blocks that render a valid WP Element that can utilize
the `blocks.getSaveContent.extraProps` filter as well as dynamic blocks that utilize
a `render_callback`. Third party blocks that do something unorthodox may not work.

[Known unsupported blocks](https://github.com/ska-dev-1/animations-for-blocks/blob/main/animations-for-blocks.php#L172-L175)

### Disable block support

The `anfb_unsupported_blocks` filter can be used in your child theme’s `functions.
php` file to disable block animation support.

    ```
    add_filter('anfb_unsupported_blocks', function($blocks) {
        $blocks[] = 'core/button';
        return $blocks;
    });
    ```

### What happens when I disable this plugin?

After disabling this plugin blocks with animations can become invalid. From there
you can attempt to recover the block by clicking “Attempt Block Recovery” which 
should remove the custom animation attributes. If you don’t want to risk blocks 
becoming invalid you need to disable all animations before disabling the plugin.

### All the animated elements are invisible on the front end

When none of the animated elements show up on your site it’s possibly due to a JavaScript
error preventing the initialization of AOS. Please open the Developer Tools (F12
on Chrome/Firefox) and look for any errors in the Console tab. You can contact support
with the error message, include your site link if possible.

## Recensioni

![](https://secure.gravatar.com/avatar/292030eb925a63e7069371b3ba4ef6a1c021eedfd9df26cb65c202b5f920ec9e?
s=60&d=retro&r=g)

### 󠀁[Seems ok but duration does not work](https://wordpress.org/support/topic/seems-ok-but-duration-does-not-work/)󠁿

 [cinek92](https://profiles.wordpress.org/cinek92/) 14 Gennaio 2026

Does anybody knows why Duration does not work? I set 2 seconds or 3 seconds duration
of animation and it does not apply. It always fade with the same quick time

![](https://secure.gravatar.com/avatar/39ff005c514bfc37b254ad2b5763931c96c49f3e713d846be7e0794df0132120?
s=60&d=retro&r=g)

### 󠀁[It worked and then it stopped](https://wordpress.org/support/topic/it-worked-and-then-it-stopped/)󠁿

 [mariuszseo](https://profiles.wordpress.org/mariuszseo/) 17 Novembre 2025

Since version 1.2.3, the animations stopped working.I reverted back to version 1.2.2
and they work.I had to disable updates.

![](https://secure.gravatar.com/avatar/7315c567321ba9b67dd32712df8ba9c45335a19e53f755f0d748e452ade354f7?
s=60&d=retro&r=g)

### 󠀁[Very good](https://wordpress.org/support/topic/very-good-7575/)󠁿

 [classikd](https://profiles.wordpress.org/classikd/) 20 Aprile 2025

Excellent plugin merci

![](https://secure.gravatar.com/avatar/59abdd519e0cb10d0be161fb8d1076c6aa6cb69737c3b0c3cd9b250d1ef5f7c5?
s=60&d=retro&r=g)

### 󠀁[Better than css animations for gutenberg blocks](https://wordpress.org/support/topic/better-than-css-animations-for-gutenberg-blocks/)󠁿

 [michaellili](https://profiles.wordpress.org/michaellili/) 1 Aprile 2025

fr fr no cap

![](https://secure.gravatar.com/avatar/99c629ef4f49adfc7d6d0ac415358e999679b11e49329011854f10e8a481c055?
s=60&d=retro&r=g)

### 󠀁[Awesome plugin!](https://wordpress.org/support/topic/awesome-plugin-7341/)󠁿

 [andrewstarr](https://profiles.wordpress.org/andrewstarr/) 14 Marzo 2025

Makes animating your block content super easy. Love it! Support queries are answered
fantastically quick, so that’s another big plus point.

![](https://secure.gravatar.com/avatar/dd3cff86ce7a39594c47e5a9a37bffd1e5faa657e6fc634c2a49a1d9b6fb97fa?
s=60&d=retro&r=g)

### 󠀁[Amazing great plugin](https://wordpress.org/support/topic/amazing-great-plugin-6/)󠁿

 [Tony Fitzpatrick80](https://profiles.wordpress.org/adambrown82/) 15 Febbraio 2025

Love this plugin that brought my static website to life. With these cool, easy-to-
configure animations, I can now compete with the big boys.

 [ Leggi tutte le recensioni di 27 ](https://wordpress.org/support/plugin/animations-for-blocks/reviews/)

## Contributi e sviluppo

“Animations for Blocks” è un software open source. Le persone che hanno contribuito
allo sviluppo di questo plugin sono indicate di seguito.

Collaboratori

 *   [ ska-dev ](https://profiles.wordpress.org/skadev/)

“Animations for Blocks” è stato tradotto in 1 lingua. Grazie a [chi traduce](https://translate.wordpress.org/projects/wp-plugins/animations-for-blocks/contributors)
per il contributo.

[Traduci “Animations for Blocks” nella tua lingua.](https://translate.wordpress.org/projects/wp-plugins/animations-for-blocks)

### Ti interessa lo sviluppo?

[Esplora il codice](https://plugins.trac.wordpress.org/browser/animations-for-blocks/)
segui il [repository SVN](https://plugins.svn.wordpress.org/animations-for-blocks/),
segui il [log delle modifiche](https://plugins.trac.wordpress.org/log/animations-for-blocks/)
tramite [RSS](https://plugins.trac.wordpress.org/log/animations-for-blocks/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.2.6

 * Tested with WordPress 7.0.
 * Update Lenis to 1.3.23.

#### 1.2.5

 * Tested with WordPress 6.9.
 * Update Lenis to 1.3.15.
 * Update `@wordpress/*` packages.

#### 1.2.4

 * Added a donate link on the plugin page – supporters get a 50% off coupon for 
   my brand new WordPress theme.
 * Added notice that lets you know when your device has `prefers-reduced-motion`
   enabled.
 * Added plugin option “Ignore reduced motion preference”.
 * Improved help text and FAQs.
 * Update Lenis to 1.3.11.
 * Update `@wordpress/*` packages.
 * Tested with Gutenberg 21.7.0.

#### 1.2.3

 * Change Animate on Scroll front end style media from `all` to `screen and (prefers-
   reduced-motion: no-preference)`.

#### 1.2.2

 * Fix `Warning: Undefined array key "attrs"` when a parsed block doesn’t have attributes.
 * Fix `Incorrect use of <label for=FORM_ELEMENT>`.
 * Replace deprecated `wp.components.ButtonGroup`.
 * Update Lenis to 1.3.8.
 * Update `@wordpress/*` packages.

#### 1.2.1

 * WP 6.8.
 * Update Lenis to 1.2.3.
 * Update `@wordpress/*` packages.

#### 1.2

 * Front end scripts are now deferred.
 * Lazyload assets option now defaults to true.
 * Added new animation – “Scale”, a subtle animation which starts from a slightly
   scaled up/down state with opacity 0 and transforms into its’ initial size while
   fading in.
 * Added new animation – “Default”. Plugin settings now allow to configure an animation
   that will be used for any block that has selected the “Default” animation.
 * Added new animation – “Inherit”. The “Animation container” block now has an option
   to become an “Animation provider”, in which case all the blocks nested inside
   of it that use the “Inherit” animation will use the animation of the provider
   block. The provider block can also stagger each subsequent animation by a specified
   amount.
 * Bundled Lenis – a lightweight smooth scroll library – can be enabled in plugin
   settings.
 * AOS is now exposed to window object on the front end (`window.AOS`).
 * Tested up to WordPress 6.7.1.
 * Requires WordPress 6.6.
 * Requires PHP 8.1.
 * Update `@wordpress/*` packages.

#### 1.1.6

 * Tested up to WordPress 6.6.
 * Update `@wordpress/*` packages.
 * Use `block.json` for Animation container block.
 * Move block styles to separate stylesheet.
 * Fix label and value mix up in RangeControl.
 * Remove some defunct code.
 * Bundled `react-jsx-runtime` to keep the plugin working with WP < 6.6.

#### 1.1.5

 * Tested up to WordPress 6.5.
 * Added option to choose where to display the animation controls – you can move
   them to the “Styles” tab or to “Advanced” inspector controls area.
 * Update `@wordpress/*` packages.

#### 1.1.4

 * Accidentally a version.

#### 1.1.3

 * Fix for crash with latest Gutenberg plugin due to `__unstableElementContext` 
   being removed.
 * Update `@wordpress/*` packages.

#### 1.1.2

 * Add option to disable automatic animation preview.
 * Add option to lazyload assets when an animated block is preset on the current
   page.
 * Update `@wordpress/*` packages.
 * Update screenshots.

#### 1.1.1

 * Use `WP_HTML_Tag_Processor` for adding HTML attributes.
 * Blocks that render multiple root elements are no longer wrapped automatically.
   Use Animation container block to do it.
 * Move all PHP code to main file for simplicity.

#### 1.1.0

 * Animation preview works in iframe-d block editors.
 * Rework controls.
 * Add ability to copy-paste animation settings.
 * Update Animation container block to API version 2.
 * Use `render_block` filter to apply animation attributes instead of overriding
   block’s `render_callback`.
 * Add `anfb_aos_attributes` filter that can modify attributes that are added to
   animated HTML elements.
 * Convert some code to typescript.
 * Update `@wordpress/*` packages.
 * Test with WordPress 6.2-RC1.

#### 1.0.6

 * Fix `once` and `mirror` options detection in dynamic blocks.
 * Update `@wordpress/*` packages.
 * Test with WordPress 6.1.1.

#### 1.0.5

 * Update `@wordpress/*` packages.
 * Test with WordPress 6.0.
 * Add GitHub link.
 * Remove `src` folder from plugin.

#### 1.0.4

 * Update block anchor selector.

#### 1.0.3

 * Use generated version number for AOS library.

#### 1.0.2

 * Fix encoding for dynamic blocks.

#### 1.0.1

 * Add more unsupported blocks.
 * Move Animation Container block to “Design” category.

#### 1.0.0

 * Initial release.

## Meta

 *  Versione **1.2.6**
 *  Ultimo aggiornamento **1 settimana fa**
 *  Installazioni attive **10.000+**
 *  Versione WordPress ** 6.6 o superiore **
 *  Testato fino alla versione **7.0**
 *  Versione PHP ** 8.1 o superiore **
 *  Lingue
 * [English (US)](https://wordpress.org/plugins/animations-for-blocks/) e [Japanese](https://ja.wordpress.org/plugins/animations-for-blocks/).
 *  [Traduci nella tua lingua](https://translate.wordpress.org/projects/wp-plugins/animations-for-blocks)
 * Tag
 * [animate](https://it.wordpress.org/plugins/tags/animate/)[animation](https://it.wordpress.org/plugins/tags/animation/)
   [block](https://it.wordpress.org/plugins/tags/block/)[gutenberg](https://it.wordpress.org/plugins/tags/gutenberg/)
   [Slide](https://it.wordpress.org/plugins/tags/slide/)
 *  [Visualizzazione avanzata](https://it.wordpress.org/plugins/animations-for-blocks/advanced/)

## Valutazioni

 4.8 su 5 stelle.

 *  [  25 recensioni a 5-stelle     ](https://wordpress.org/support/plugin/animations-for-blocks/reviews/?filter=5)
 *  [  0 recensioni a 4-stelle     ](https://wordpress.org/support/plugin/animations-for-blocks/reviews/?filter=4)
 *  [  1 3- recensioni a stelle     ](https://wordpress.org/support/plugin/animations-for-blocks/reviews/?filter=3)
 *  [  1 2- recensioni a stelle     ](https://wordpress.org/support/plugin/animations-for-blocks/reviews/?filter=2)
 *  [  0 recensioni a 1-stelle     ](https://wordpress.org/support/plugin/animations-for-blocks/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/animations-for-blocks/reviews/#new-post)

[Vedi tutte le recensioni](https://wordpress.org/support/plugin/animations-for-blocks/reviews/)

## Collaboratori

 *   [ ska-dev ](https://profiles.wordpress.org/skadev/)

## Supporto

Hai qualcosa da dire? Ti serve aiuto?

 [Chiedi nel forum di supporto](https://wordpress.org/support/plugin/animations-for-blocks/)

## Donazioni

Vuoi sostenere le versioni future?

 [ Fai una donazione per lo sviluppo ](https://buymeacoffee.com/skadev)