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>
<script src="https://cdn.datatables.net/scroller/2.0.3/js/dataTables.scroller.min.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/scroller/2.0.3/css/scroller.dataTables.min.css">
<div class="container">
<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>
</tr>
</thead>
</table>
</div>
CSS
div.dts_label {
display: none !important;
}
div.container {
height: 15rem;
}
div.dataTables_wrapper,
div.dataTables_scroll {
height: 100%;
}
JavaScript
$(document).ready(function() {
var data = [];
for (var i = 0; i < 80; i++) {
data.push(['<img src="https://placeimg.com/20/20/animals" height="20px" width="20px">', i, i, i, i]);
}
$('#example').DataTable({
data: data,
deferRender: true,
scrollY: 'calc(100% - 4rem)',
scrollCollapse: true,
scroller: true
});
});