This example utilizes Bootstrap CSS for a responsive and visually appealing design, offering prebuilt components and styling for fast development. Additionally, a Vanilla Grid system is integrated via a separate JavaScript file to create a flexible, lightweight grid layout. By keeping the Vanilla Grid import in a dedicated script, the code remains modular and easy to maintain. Bootstrap handles the overall styling and responsiveness, while Vanilla Grid provides a streamlined solution for organizing content. This combination ensures a clean, structured, and efficient web design, suitable for various screen sizes and devices.
| # | Column 1 | Column 2 | Column 3 |
|---|---|---|---|
| 1 | Data 1 | Data 2 | Data 3 |
| 2 | Data 1 | Data 2 | Data 3 |
| 3 | Data 1 | Data 2 | Data 3 |
| 4 | Data 1 | Data 2 | Data 3 |
| 5 | Data 1 | Data 2 | Data 3 |
| 6 | Data 1 | Data 2 | Data 3 |
| 7 | Data 1 | Data 2 | Data 3 |
| 8 | Data 1 | Data 2 | Data 3 |
| 9 | Data 1 | Data 2 | Data 3 |
| 10 | Data 1 | Data 2 | Data 3 |
| 11 | Data 1 | Data 2 | Data 3 |
| 12 | Data 1 | Data 2 | Data 3 |
| 13 | Data 1 | Data 2 | Data 3 |
| 14 | Data 1 | Data 2 | Data 3 |
| 15 | Data 1 | Data 2 | Data 3 |
| 16 | Data 1 | Data 2 | Data 3 |
| 17 | Data 1 | Data 2 | Data 3 |
| 18 | Data 1 | Data 2 | Data 3 |
| 19 | Data 1 | Data 2 | Data 3 |
| 20 | Data 1 | Data 2 | Data 3 |
| 21 | Data 1 | Data 2 | Data 3 |
| 22 | Data 1 | Data 2 | Data 3 |
| 23 | Data 1 | Data 2 | Data 3 |
| 24 | Data 1 | Data 2 | Data 3 |
| 25 | Data 1 | Data 2 | Data 3 |
| # | Column 1 | Column 2 | Column 3 |
|---|---|---|---|
| 1 | Data 1 | Data 2 | Data 3 |
| 2 | Data 1 | Data 2 | Data 3 |
| 3 | Data 1 | Data 2 | Data 3 |
| 4 | Data 1 | Data 2 | Data 3 |
| 5 | Data 1 | Data 2 | Data 3 |
| 6 | Data 1 | Data 2 | Data 3 |
| 7 | Data 1 | Data 2 | Data 3 |
| 8 | Data 1 | Data 2 | Data 3 |
| 9 | Data 1 | Data 2 | Data 3 |
| 10 | Data 1 | Data 2 | Data 3 |
| 11 | Data 1 | Data 2 | Data 3 |
| 12 | Data 1 | Data 2 | Data 3 |
| 13 | Data 1 | Data 2 | Data 3 |
| 14 | Data 1 | Data 2 | Data 3 |
| 15 | Data 1 | Data 2 | Data 3 |
| 16 | Data 1 | Data 2 | Data 3 |
| 17 | Data 1 | Data 2 | Data 3 |
| 18 | Data 1 | Data 2 | Data 3 |
| 19 | Data 1 | Data 2 | Data 3 |
| 20 | Data 1 | Data 2 | Data 3 |
| 21 | Data 1 | Data 2 | Data 3 |
| 22 | Data 1 | Data 2 | Data 3 |
| 23 | Data 1 | Data 2 | Data 3 |
| 24 | Data 1 | Data 2 | Data 3 |
| 25 | Data 1 | Data 2 | Data 3 |
import { VanillaGrid } from "@skriptx2/vanillagrid";
window.addEventListener("DOMContentLoaded", function () {
const table1 = document.querySelector("table.table-1");
new VanillaGrid(table1, {
itemsPerPage: 10,
info: "Showing :start to :end of :total entries",
classNames: {
wrapper: "d-flex justify-content-between align-items-center",
ul: "pagination",
li: "page-item",
button: "page-link",
select: "form-select",
},
});
const table2 = document.querySelector("table.table-2");
new VanillaGrid(table2, {
itemsPerPage: 1,
info: "Showing :start to :end of :total entries",
classNames: {
wrapper: "d-flex justify-content-between align-items-center",
ul: "pagination",
li: "page-item",
button: "page-link",
select: "form-select",
},
});
});