JSFiddle - React, Tailwind, and code Playground
by CridaEngo
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="//cdn.datatables.net/1.13.7/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.4.2/css/buttons.dataTables.min.css">
</head>
<body>
<table id="example">
<thead>
<tr>
<th>Name</th>
<th>Reg.number</th>
<th>Limit</th>
</tr>
</thead>
<tbody>
<tr><td>Jon</td><td>123455665</td><td>100.000.00</td>
<tr><td>Foo</td><td>123423423</td><td>55.00.00</td>
<tr><td>Foo</td><td>123423423</td><td>-3.600</td>
</tbody>
</table>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<!-- Chartist JS -->
<script type="text/javascript" src="//cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/responsive/2.2.9/js/dataTables.responsive.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/2.4.2/js/dataTables.buttons.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/2.4.2/js/buttons.html5.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/2.4.2/js/buttons.print.min.js"></script>
</body>
</html>
JavaScript
$(document).ready(function () {
$("#example").DataTable({
dom: "Bfrtip",
buttons: ["copy", "csv","excel", "pdf", "print"],
responsive: {
details: {
display: $.fn.dataTable.Responsive.display.childRowImmediate,
type: "none",
target: "",
},
},
});
});