Its nano tech. You like it?
Setup a basic script tag with a src to the nanotabs.js file and in your html file add a version of the following code.
<div id="tabBar">
<template><div><p>Tab</p></div></template>
</div>
<div id="tabContent">
<template><div></div></template>
</div>
The template controls will becore your tab and content items when created.
In your main Js file add the following code.
const tc = new NanoTabs('tabBar', 'tabContent', {});
tabBar_id- StringtabContent_id- StringOptions- Object (optional)showAddBtn- true/false
tabcount- returns a count of tab elements
addTab({opts})- creates and adds a new tab and content elementremoveTab(t_id)- removes tab and content based in passed idselectTab(t_id)- selects tab and content based in passed id
addGroup({opts})- WIPaddTabToGroup(t_id, g_id)- WIPremoveTabFromGroup(t_id, g_id)- WIPremoveGroup(g_id)- WIP
addEventListener(event, void)- creates event listener (see events)
tab-select=> (selectedTab, selectedContent)tab-added=> (newTab, newContent)tab-removed=> ()tab-allRemoved=> ()
group-added=> WIPgroup-removed=> WIP
.nanotabs_tabList- div containing all tabs.nanotabs_addBtn- tab add button.nanotabs_group- group container.nanotabs_groupbadge- group badge title