Animations for Blocks
Allows to add animations to Block Editor blocks on scroll.
Install in
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.
Live demo on WordPress Playground
Plugin website
This plugin uses AOS – Animate on scroll library 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).
Written by Joobi from the project's own listing. See the source page
1.2.8
- Tested with WordPress 7.2-RC2.
- Added global toggle option to disable animations on mobile.
- Update Lenis to 1.3.28.
- Update
@wordpress/*packages.
1.2.7
- Tweaked UI for WordPress 7.1.
- Update Lenis to 1.3.26.
- The plugin now has a website.
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-motionenabled. - 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
alltoscreen 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.jsonfor Animation container block. - Move block styles to separate stylesheet.
- Fix label and value mix up in RangeControl.
- Remove some defunct code.
- Bundled
react-jsx-runtimeto 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
__unstableElementContextbeing 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_Processorfor 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_blockfilter to apply animation attributes instead of overriding block’srender_callback. - Add
anfb_aos_attributesfilter 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
onceandmirroroptions 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
srcfolder 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.
Follow this listing's changes (Atom feed)