Collapse It – Show More/Less Expand Button

Description

Collapse It is a modern Gutenberg block that allows you to collapse or expand any content area with a smooth fade effect and a customizable «Show More / Show Less» button. The block is highly flexible, letting you set the collapsed height, button styles, and texts. It also features smart empty-content detection: if the block is empty (even if it contains an empty shortcode block), it will automatically hide itself, keeping your pages clean and professional.

Key Features:
* Collapse/expand any content with a fade effect
* Automatically hides when empty (even with empty shortcode or any dynamic blocks)
* Customizable collapsed height
* Fully customizable Show More / Show Less button (text, color, alignment, border radius, font size, padding)
* Gutenberg block editor support
* No tracking, no ads, no bloat
* 100% WordPress Coding Standards compliant
* Developer: Dashboard Team

Usage

  1. Insert the «Show More (Collapse)» block in the editor.
  2. Add any content (text, images, blocks, or even shortcodes) inside the block.
  3. Adjust the collapsed height and button styles from the block settings panel.
  4. The block will automatically hide itself if left empty (including empty shortcode blocks).

License

This plugin is licensed under the GPLv2 or later. See https://www.gnu.org/licenses/gpl-2.0.html

Screenshots

  • Collapsed content on the frontend
  • Expanded content on the frontend
  • Finding Collapse it block
  • Block settings in the editor
  • Style settings in the editor

Blocks

This plugin provides 1 block.

  • Show More (Collapse) A block that collapses content with a fade and a show more/less button.

Installation

  1. Upload the plugin files to the /wp-content/plugins/collapse-it directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Add the «Show More (Collapse)» block to any post or page using the Gutenberg editor.

FAQ

Will the block show up if I add an empty shortcode or leave it blank?

No. The block automatically checks for visible content and hides itself if empty, even if you add an empty shortcode block inside.

Can I customize the Show More / Show Less button?

Yes! You can change the button text, color, alignment, border radius, font size, and padding from the block settings panel.

Is this block compatible with all themes?

The block is designed to work with any theme that supports Gutenberg blocks. For best results, use a modern, block-based theme.

Does this plugin add any tracking or ads?

No. Collapse It is 100% privacy-friendly and contains no tracking, ads, or bloat.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Collapse It – Show More/Less Expand Button” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.0

  • Initial release