JSFiddle - React, Tailwind, and code Playground

by Flexmonster Pivot Table

HTML

<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>

<div id="pivot-container"></div>

CSS

.vip {
  width: 45px;
  height: 45px;
}

.present {
  width: 30px;
  height: 30px;
}

JavaScript

var pivot = new Flexmonster({
	container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  beforetoolbarcreated: customizeToolbar
});

function customizeToolbar(toolbar) {

    var tabs = toolbar.getTabs();
    toolbar.getTabs = function () {
        
        tabs.unshift({
            id: "fm-tab-newtab1",
            title: "New",
            icon: "<img src='https://i.postimg.cc/y8nBBwNn/winner.png' class=\"vip\" border='0' alt='winner'/>",
            menu: [
              {
                id: "fm-tab-gift1",
                title: "Gift 1",
                handler: gift1TabHandler,
                icon: "<img src='https://i.postimg.cc/gkpgD12z/gift-box.png' class=\"present\" border='0' alt='gift-box'/>" 
              },
              {
                id: "fm-tab-gift2",
                title: "Gift 2",
                handler: gift2TabHandler,
                icon: "<img src='https://i.postimg.cc/gkpgD12z/gift-box.png' class=\"present\" border='0' alt='gift-box'/>" 
              },
              {
                id: "fm-tab-gift3",
                title: "Gift 3",
                handler: gift3TabHandler,
                icon: "<img src='https://i.postimg.cc/gkpgD12z/gift-box.png' class=\"present\" border='0' alt='gift-box'/>" 
              }
            ]
        });
        
        return tabs;
    }

    var gift1TabHandler = function() {
      alert("New gift 1!")
    };
     var gift2TabHandler = function() {
      alert("New gift 2!")
    }  
    var gift3TabHandler = function() {
      alert("New gift 3!")
    }
}