Kap.tabs is nothing more but simple tabs. No powerful configuration, no powerful features.
BUT
- Module weights only 1.47 kB. Perfect. (Yeah, npm may show you more, but it's cause of README. Don't look at that)
- If you don't need such a hard tabs, you can use and don't give a damn about the downloading page
npm i kap-tabs
Nothing more
import tabs from 'tabs';
tabs(tabsSelector, contentSelector, parentSelector, activeClass);
Parameter | Meaning |
---|---|
tabsSelector |
Selector, which defines on what do you click to change tabs |
contentSelector |
Selector, which defines where located content of each tab |
parentSelector |
Selector of parent element |
activeClass |
Certain CLASS, which defines the active tab |
Your CSS files must contain next classes:
-
show
For example:show{ opacity: 1; display: block; visibility: visible; }
-
hide
For example:hide{ opacity: 0; display: none; visability: hidden; }
-
fade (Not necessary)
For example:.fade{ animation-name: fade; animation-duration: 1.5s; } @keyframes fade{ from{ opacity: 0.1; } to{ opacity: 1; } }
- Make pull requests in case of suggestions: https://github.com/kapiernik/kap-tabs
- Write on my email: kapiernik27@gmail.com
The project is licensed under the MIT license.