GDS Block Animations WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA
Animate WordPress blocks on scroll with customizable settings.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/generoi/gds-block-animations/archive/refs/heads/master.zipGDS Animate WordPress Plugin
A WordPress plugin that adds animation classes to blocks on scroll. Simple and flexible - no dependencies, no build process!
How It Works
The plugin adds two classes to enabled blocks:
gds-block-animations-block- Added immediately when page loadsgds-animate-visible- Added when block enters viewport (with 50ms delay for blocks already visible on load)
You style the animations in your theme CSS!
Features
- ✨ Pure PHP, CSS, and JS - no build tools needed
- 🎨 Simple class-based system - style animations in your theme
- 📱 Respects user's motion preferences
- 🎯 Admin settings page to enable/disable per block
- 🚀 Performant using IntersectionObserver API
- ♿ Accessibility-friendly
Installation
- Activate the plugin through the 'Plugins' menu in WordPress
- Go to Settings → GDS Animate to enable blocks
- Add animation styles in your theme CSS
Usage
1. Enable Blocks (Admin)
- Navigate to Settings → GDS Animate in WordPress admin
- Browse all available blocks grouped by category:
- Text - Paragraph, Heading, List, etc.
- Media - Image, Gallery, Video, Audio, etc.
- Design - Button, Columns, Group, Spacer, etc.
- Widgets - Shortcode, Archives, Calendar, etc.
- Theme - Navigation, Site Logo, Template Parts, etc.
- Embeds - YouTube, Twitter, Instagram, etc.
- Check the blocks you want to animate
- Click Save Changes
Each block shows its title and technical name (e.g., core/media-text)
2. Disable Per-Block (Editor)
You can disable animation for individual blocks:
- Select any enabled block in the editor
- Look for Animation Settings panel in the sidebar (Inspector Controls)
- Toggle "Disable scroll animation" to turn off animation for that specific block
- Animation will be disabled only for that block instance
3. Style Animations (Theme CSS)
The plugin just adds classes - you create the animations! Example:
/* Query Loop with staggered cards */
.wp-block-query.gds-block-animations-block .wp-block-gds-post-teaser {
opacity: 0;
transform: translateY(20px);
transition:
opacity 0.5s ease,
transform 0.5s ease;
}
.wp-block-query.gds-animate-visible .wp-block-gds-post-teaser:nth-child(1) {
opacity: 1;
transform: translateY(0);
transition-delay: 0s;
}
.wp-block-query.gds-animate-visible .wp-block-gds-post-teaser:nth-child(2) {
opacity: 1;
transform: translateY(0);
transition-delay: 0.1s;
}
.wp-block-query.gds-animate-visible .wp-block-gds-post-teaser:nth-child(3) {
opacity: 1;
transform: translateY(0);
transition-delay: 0.2s;
}
/* Continue for more items... */
4. Debug (Console)
gdsAnimate();
Shows enabled blocks and animation counts.
File Structure
gds-animate/
├── gds-animate.php # Main plugin with settings
├── assets/
│ ├── style.css # Example styles (optional)
│ ├── script.js # Class management logic (frontend)
│ └── editor.js # Block editor controls
└── README.md # This file
Development
Adding New Blocks
1. Update PHP (gds-animate.php):
- Add to default options array
- Add checkbox in settings form
2. Update JS (assets/script.js):
- Add to
blockClassMapobject
3. Style in Theme:
- Add CSS for
.your-block.gds-block-animations-blockand.your-block.gds-animate-visible
Technical Details
- IntersectionObserver triggers when 10% of block is visible
- 100px bottom margin offset (animates slightly before fully visible)
- Blocks are observed once (not repeated on scroll up/down)
- 50ms delay for blocks visible on page load ensures smooth animation
License
GPL-2.0+
Releases
3 releases.
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.