create-tab
Dead simple way to create Tabs
Why should you use create-tab?
- Tiny size: 1kb
- Add your own css style
- No dependencies
- Create functional tabs faster
Install
Npm: npm install create-tab
CDN: https://unpkg.com/create-tab@0.0.4
The Gist:
// ES6 Module;; // Browser;
API
/** * @name createTab * type Function * @description Create one Tab automatically * @param * @param * return void */ ;
HTML Element Params
<!-- data-item="tab-name" The correspondent data-view value that will be render --> <!-- data-initial="true" The initial rendered tab view. Will be appended the class .tab-active automatically on each click event--> <!-- data-view="tab-view-name" The tab view name. Will be rendered when the correspondent data-item is clicked--> <!-- Tab Links id --> <!-- Tab Links Children --> Tab One Tab Two Tab Three Tab Four <!-- Tab View id --> <!-- Tab View Children --> Tab 1 Tab 2 Tab 3 Tab 4
LICENSE
[MIT]