colby-tabs
v1.0.1
Published
A WordPress shortcode, CSS, and JavaScript for multitabbed content areas.
Downloads
1
Readme
colby-tabs
Install
npm install --save colby-tabs
Usage
In JavaScript (required)
import 'colby-tabs';
In SCSS (required for proper default display)
@import '~colby-tabs/index.css';
Import PHP shortcode
require( $PROJECT_ROOT . 'node_modules/colby-tabs/index.php' );
WordPress shortcodes
[colby-tabs]
[colby-tab title="First tab title"]
First tab content
[/colby-tab]
[colby-tab title ="Second tab title"]
Second tab content
[/colby]
[/colby-tabs]
Using HTML (to bypass PHP)
<div data-colby-tabs class="colby-tabs">
<div class="colby-tabs__buttons"></div>
<div class="colby-tabs__inner">
<div data-colby-tab data-colby-tab-title="First tab title" class="colby-tab">
<div class=\"colby-tab__inner\">
First tab content
</div>
</div>
<div data-colby-tab data-colby-tab-title="Second tab title" class="colby-tab">
<div class=\"colby-tab__inner\">
Second tab content
</div>
</div>
</div>
</div>