Bottom Tab Demo App

/* Bottom Tab Menu Configuration */
{
  "tabSelectionConfig": [
    {
      "id": "1",
      "regex": "https://gonativeio.github.io/gonative-demos/about.*"
    },
    {
      "id": "2",
      "regex": "https://gonativeio.github.io/gonative-demos/contact.*"
    }
  ],
  "tabMenus": [
    {
      "items": [
        {
          "subLinks": [],
          "label": "Home",
          "url": "https://gonativeio.github.io/gonative-demos/sidebar-tab-demo.html",
          "icon": "fas fa-home"
        },
        {
          "subLinks": [],
          "label": "Contact Us",
          "url": "https://gonativeio.github.io/gonative-demos/contact.html",
          "icon": "fas fa-envelope-o"
        }
      ],
      "id": "1"
    },
    {
      "items": [
        {
          "subLinks": [],
          "label": "Home",
          "url": "https://gonativeio.github.io/gonative-demos/sidebar-tab-demo.html",
          "icon": "fas fa-home"
        },
        {
          "subLinks": [],
          "label": "About Us",
          "url": "https://gonativeio.github.io/gonative-demos/about.html",
          "icon": "fas fa-user"
        }
      ],
      "id": "2"
    }
  ],
  "active": true
}
/* Set Bottom Tab Menu Items */
var tabs = {
  "enabled": true, // set enabled to false to hide the tabs
  "items": [{
      "icon": "fas fa-cloud", //optional
      "label": "Tab 1",
      "url": "javascript:alert('You selected tab 1')"
  }, {
      "icon": "fas fa-globe", //optional
      "label": "Tab 2",
      "url": "javascript:alert('You selected tab 2')"
  }, {
      "icon": "fas fa-users", //optional
      "label": "Tab 3",
      "url": "javascript:alert('You selected tab 3')"
  }]
};

var json = JSON.stringify(tabs);
window.location.href='gonative://tabs/setTabs?tabs=' + encodeURIComponent(json);
/* Select Bottom Tab Menu Item */
if (navigator.userAgent.indexOf('gonative') > -1) {
  window.location.href = 'gonative://tabs/select/1'; 
  // the tabs are 0-indexed
  // i.e. tabs/select/1 will select the second tab
}