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/nickfmc/bitsblocks/archive/refs/heads/main.zipReact Bits Blocks for WordPress
A collection of beautiful text animation blocks for WordPress Gutenberg, inspired by reactbits.dev.
Features
- Multiple Animation Blocks: Collection of text animation components
- Enable/Disable Blocks: WordPress admin settings to control which blocks are active
- Customizable: Full control over colors, sizes, animations, and timing
- Performance Optimized: Smooth CSS-based animations with minimal JavaScript
- Block Editor Preview: See animations in real-time while editing
Available Blocks
1. Rotating Text
Displays rotating text with smooth fade transitions.
Features:
- Customizable prefix and rotating words
- Adjustable rotation duration
- Font size, weight, and alignment controls
- Separate colors for prefix and rotating text
Based on: reactbits.dev/text-animations/rotating-text
2. True Focus
Text that blurs and focuses based on scroll position, creating a dynamic reading experience.
Features:
- Blur effect based on distance from viewport center
- Adjustable blur amount
- Font customization
- Smooth transitions
Based on: reactbits.dev/text-animations/true-focus
Installation
- Copy the plugin folder to your WordPress
wp-content/plugins/directory - Install dependencies:
npm install - Build the blocks:
npm run build - Activate the plugin from the WordPress admin dashboard
- Go to Settings → React Bits Blocks to enable/disable individual blocks
Development
Build for Production
npm run build
Development Mode (with file watching)
npm start
Linting
npm run lint:js
npm run lint:css
Managing Blocks
After activating the plugin, navigate to Settings → React Bits Blocks in your WordPress admin panel. Here you can:
- Enable or disable individual blocks
- See descriptions of each block
- Save your preferences
Only enabled blocks will appear in the block inserter.
File Structure
react-bits-blocks/
├── rotating-text-block.php # Main plugin file
├── package.json # NPM dependencies
├── README.md # Documentation
└── blocks/
├── rotating-text/
│ ├── block.json
│ ├── index.js
│ ├── edit.js
│ ├── save.js
│ ├── style.css
│ ├── editor.css
│ └── view.js
└── true-focus/
├── block.json
├── index.js
├── edit.js
├── save.js
├── style.css
├── editor.css
└── view.js
Adding More Blocks
To add new React Bits components:
- Create a new folder in
blocks/(e.g.,blocks/new-animation/) - Add the standard block files:
block.json,index.js,edit.js,save.js,style.css,editor.css,view.js - Update the
$blocksarray inrotating-text-block.php - Update the build script in
package.json - Run
npm run build
License
GPL-2.0-or-later
Credits
All blocks are inspired by and based on components from React Bits - A collection of React components and animations.