JSFiddle - React, Tailwind, and code Playground

by sinju

HTML

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/1.11.5/css/jquery.dataTables.css">
<script src="https://cdn.datatables.net/1.13.6/js/dataTables.bootstrap5.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>

    <table id="myTable" class="table">
        <thead>
            <tr>
                <th>ID</th>
                <th>Name</th>
                <th>Comments</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>1</td>
                <td>Ram Kumar</td>
                <td>Some comment</td>
            </tr>
            <tr>
                <td>2</td>
                <td>Rameez Smith</td>
                <td>Another comment</td>
            </tr>
            <tr>
                <td>3</td>
                <td>John Smith</td>
                <td>Comments go here</td>
            </tr>
            <tr>
                <td>4</td>
                <td>Ramsey Johnson</td>
                <td>Additional comments</td>
            </tr>
            <tr>
                <td>5</td>
                <td>Lisa Thompson</td>
                <td>More comments</td>
            </tr>
            <tr>
                <td>6</td>
                <td>Michael Brown</td>
                <td>Additional thoughts</td>
            </tr>
            <tr>
                <td>7</td>
                <td>Sam Ramsey</td>
                <td>Some more comments</td>
            </tr>
            <tr>
                <td>8</td>
                <td>Emily Ramirez</td>
                <td>Comments go here</td>
            </tr>
            <tr>
                <td>9</td>
                <td>Rameez Khan</td>
                <td>Extra...

JavaScript

$(document).ready(function () {
	let table = new DataTable('#myTable', {
		searching: true,
	});
});