Add scroll based animations to WordPress Gutenberg blocks.
Features
- Choose from 76 cross-browser CSS3 animations or add your own
- Preview animations in the editor
- Adjust the animation duration, delay, scroll threshold, and offset
- Apply animation controls directly to regular Gutenberg blocks
- Show or hide animation controls for regular blocks from Settings > Animated Blocks
- Replay the selected dropdown animation from the editor inspector
Settings
- Duration: The speed of the animation in milliseconds.
- Delay: How many milliseconds to wait before animating the element.
- Threshold: Add animation when x% of the element enters the screen.
- Start with opacity 0: Set the element to opacity 0 when the page loads. The option works for elements transitioning to 100% opacity through CSS.
- Offset Top (available in the block’s advanced settings): Number of pixels to offset the animated block from the top of the page. Useful when a page has a fixed top navigation bar.
- Show animation controls on all blocks: Enable or disable animation controls for regular Gutenberg blocks. When disabled, blocks that already have saved animation settings keep showing the controls until those settings are cleared.
- Class name “ab-animation-end” is added to the animated block after the CSS animation has ended. This class name can be used to add custom styles.
Requirements
PHP 5.6+ is recommended, WordPress 5.0+, and Gutenberg must be active.
Documentation
Select a Gutenberg block and open the block settings sidebar to find the Animations panel. Choose an animation from the dropdown, optionally add a custom animation class, and adjust duration, delay, threshold, opacity, and offset settings. The selected animation classes are added when the block enters the viewport.
Animation controls can be disabled globally from Settings > Animated Blocks by turning off “Show animation controls on all blocks”. When that option is disabled, blocks that already have saved animation settings will keep showing the animation panel until those settings are cleared.
You can also use the Animated Block container from the Design block group. Animated Block is a parent block that lets you nest as many blocks as you want and apply the same animation settings to the whole container.
If you need a custom effect, enter your own CSS class name in the Custom animation field and load the matching CSS in your theme or plugin.