Basic Local Table
Vanilla JavaScript data table with sorting, search, pagination, render callbacks, and lifecycle hooks.
Library setup
Start with the core stylesheet, import DogTable, and
pass local data plus your columns.
<link rel="stylesheet" href="../src/data-table.css" />
<script type="module">
import { DogTable } from "../src/data-table.js";
const table = new DogTable("#app", {
data,
pageSize: 3,
columns: [
{ key: "name", label: "Name" },
{ key: "breed", label: "Breed" },
{ key: "age", label: "Age" },
],
});
table.init();
</script>