My Card Block
React card block with image, title, and description for Gutenberg
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/hlibpanchenko/my-card-block/archive/refs/heads/main.zipReadme
My Card Block
A custom card block for WordPress Gutenberg with an image, title, description, and button.
Features
- 🖼️ Image upload via the WordPress media library
- ✏️ Editable title and description
- 🔘 Optional button with customizable text and link
- 🎨 Clean design with hover effects
- 📱 Responsive layout
Installation
1. Clone the folder into plugins
cd wp-content/plugins/
# Copy the my-card-block folder here
2. Install dependencies
cd my-card-block
npm install
3. Build the block
# For production (one-time build)
npm run build
# For development (watches for changes)
npm run start
4. Activate the plugin
Go to the WordPress admin panel → Plugins → Activate "My Card Block"
Usage
- Open the page/post editor
- Click "+" to add a block
- Search for the "Card" block
- Add an image, title, and description
- Configure the button in the sidebar (text, link, enable/disable)
File Structure
my-card-block/
├── my-card-block.php # Main plugin file
├── package.json # Dependencies and scripts
├── src/
│ ├── index.js # Block React component
│ ├── block.json # Block metadata
│ ├── style.scss # Frontend styles
│ └── editor.scss # Editor styles
└── build/ # Compiled files (generated on build)
Customization
You can modify styles in src/style.scss (frontend) and src/editor.scss (editor).
Don't forget to rebuild after making changes: npm run build