JSFiddle - React, Tailwind, and code Playground

Demos

by Flexmonster Pivot Table

HTML

<script src="https://cdn.flexmonster.com/flexmonster.js"></script>

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

CSS

@import url(https://cdn.flexmonster.com/assets/jsfiddle-styles.css);

.fm-custom-cell {
  display: flex !important;
  align-items: center !important;
  font-size: 12px !important;
}

.fm-custom-cell .flag-icon {
  width: 21px !important;
  height: 16px !important;
  margin-left: 0 !important;
  margin-right: 2px !important;
}

#fm-pivot-view .fm-grid-layout .fm-custom-cell.fm-expanded .fm-expanded-icon::before, 
#fm-pivot-view .fm-grid-layout .fm-custom-cell.fm-collapsed .fm-collapsed-icon::before {
  top: -2px;
  height: 16px;
}

JavaScript

new Flexmonster({
  container: '#pivot-container',
  componentFolder: 'https://cdn.flexmonster.com/',
  height: 550,
  toolbar: true,
  report: {
    dataSource: {
      type: 'json',
      filename: 'https://cdn.flexmonster.com/data/retail-data-2024.json',
    },
    slice: {
      reportFilters: [
        {
          uniqueName: 'Country',
        },
      ],
      rows: [
        {
          uniqueName: 'Country',
        },
      ],
      columns: [
        {
          uniqueName: '[Measures]',
        },
      ],
      measures: [
        {
          uniqueName: 'Price',
          aggregation: 'sum',
        },
      ],
    },
  },
})