TabularQuick Start
Quick Start
Last updated:
Quick Start
Basic Table
import { createTable } from "@visulima/tabular";
const table = createTable();
table.setHeaders(["Name", "Email"]);
table.addRow(["John", "john@example.com"]);
table.addRow(["Jane", "jane@example.com"]);
console.log(table.render());With Styling
const table = createTable({
maxWidth: 80,
style: {
paddingLeft: 1,
paddingRight: 1,
},
});Column Alignment
table.setHeaders([
"Name",
{ content: "Age", hAlign: "center" },
{ content: "Score", hAlign: "right" },
]);