Download the PHP package wpbones/pure-css-tabs without Composer
On this page you can find all versions of the php package wpbones/pure-css-tabs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wpbones/pure-css-tabs
More information about wpbones/pure-css-tabs
Files in wpbones/pure-css-tabs
Package pure-css-tabs
Short Description Pure CSS tabs for WP Bones
License MIT
Homepage https://github.com/wpbones/pure-css-tabs
Informations about the package pure-css-tabs
Pure CSS Tabs for WP Bones
This package provides a simple way to create tabs with pure CSS for WordPress/WP Bones.
Requirements
This package works with a WordPress plugin written with WP Bones framework library.
Installation
You can install third party packages by using:
I advise to use this command instead of composer require
because doing this an automatic renaming will done.
You can use composer to install this package:
You may also to add " wpbones/pure-css-tabs": "~0.7"
in the composer.json
file of your plugin:
and run
Enqueue for Controller
You can use the provider to enqueue the styles.
PureCSSTabsProvider
This is a static class autoloaded by composer. You can use it to enqueue or get the styles path:
HTML markup
Of course, you may use the fragment feature to include the single tabs:
In /folder/tab1.php
you just insert the following markup:
Customize
Of course, you can edit both of CSS or LESS files in order to change the appearance of tabs. In the LESS file, you'll find the color variable as well.
💡 Anyway, the best way to customize your tabs is override the default styles. Otherwise, when an update will be done you'll lose your customization.
Helper
In addition, you can use some methods provided by PureCSSTabsProvider
class.
In your HTML view you might use:
Also, you can use openTab()
and closeTab()
methods:
👆 Remember, in the example above I have used
WPKirk
base namespace. You should replace it with your own namespace.