JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.min.css">
<script src="https://cdn.datatables.net/scroller/2.0.5/js/dataTables.scroller.min.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/scroller/2.0.5/css/scroller.dataTables.min.css">
<div id="container"style="max-width: 600px;">
<table id="example" class="display nowrap" style="width:100%">
<thead>
<tr>
<th>ID</th>
<th>First name</th>
<th>Last name</th>
<th>ZIP / Post code</th>
<th>Country</th>
<th>ID</th>
<th>First name</th>
<th>Last name</th>
<th>ZIP / Post code</th>
<th>Country</th>
<th>ZIP / Post code</th>
<th>Country</th>
</tr>
</thead>
</table>
</div>
JavaScript
$(document).ready(function() {
var data = [];
for (var i = 0; i < 40; i++) {
data.push([i, i, i, i, i, i, i, i, i, i, i, i, i, i ,i]);
}
var table = $('#example').DataTable({
data: data,
deferRender: true,
scrollY: '10rem',
scrollCollapse: true,
scroller: true
});
});