WP Manifestindependent plugin directory
manifest / editor / hm-tabs-block

HM Tabs Block

Simple tab block.

by Human Made Limited · github.com/humanmade/hm-tabs-block · website

18stars
4.5kcomposer installs
1forks

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/humanmade/hm-tabs-block/archive/refs/heads/main.zip

Also on Packagist as humanmade/hm-tabs-block:

composer require humanmade/hm-tabs-block

From the readme

HM Tabs Block Super simple tab block for the WordPress block editor. The Objective is to create something incredibly flexible, providing simple markup without any styling, allowing you to integrate with your theme easily. It also aims to be accessible. The implementation is adapted from the MDN Aria tab role documentation. Performance is also important. The JS is lightweight and has no dependencies. The tabs block is made up of 2 blocks. A container tabs block, and a child tabs-item block. The tabs item block is simply a wrapper, allowing you to add any content you wish. Saved markup. One of the aims of this block is to keep the saved HTML really minimal. It should look OK even if this plugin is deactivated. All of the functionality and interactive elements are created on the fly either rendered server side or constructed in JS. Styling the tabs. The tabs are functional but unstyled. Here is a sample of the markup to show the classes you can use to style the tabs. Example styling And here's some CSS to style up some nice old school looking tabs. Some useful classes for styling and animation. .hm-tabs--is-initialized Added once JS has initialized the tab functionalit

Read the full README on GitHub →

Releases

TagPublishedAssetDownloads
1.0.0Feb 14, 2024