JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="https://cdn.datatables.net/v/dt/jq-3.6.0/dt-1.13.1/b-2.3.2/b-colvis-2.3.2/datatables.min.css">
<script src="https://cdn.datatables.net/v/dt/jq-3.6.0/dt-1.13.1/b-2.3.2/b-colvis-2.3.2/datatables.min.js"></script>
<table id="example" class="display" style="width:100%">
<thead>
<tr>
<th colspan="2">Person</th>
<th colspan="2">HR Information</th>
<th colspan="3">Contact</th>
</tr>
<tr>
<th>Name</th>
<th>Birthday</th>
<th>Position</th>
<th>Salary</th>
<th>Office</th>
<th>Extn.</th>
<th>E-mail</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tiger Nixon</td>
<td>1970-01-01</td>
<td>System Architect</td>
<td>$320,800</td>
<td>Edinburgh</td>
<td>5421</td>
<td>[email protected]</td>
</tr>
<tr>
<td>Garrett Winters</td>
<td>1980-01-01</td>
<td>Accountant</td>
<td>$170,750</td>
<td>Tokyo</td>
<td>8422</td>
<td>[email protected]</td>
</tr>
<tr>
<td>Ashton Cox</td>
<td>1990-01-01</td>
<td>Junior Technical Author</td>
<td>$86,000</td>
<td>San Francisco</td>
<td>1562</td>
<td>[email protected]</td>
</tr>
</tbody>
</table>
JavaScript
$(document).ready(function () {
$('#example').DataTable({
buttons: ['colvis'],
dom: 'Btip',
});
});