Quick Start
comins-table@0.2.2
Install Comins Table with React and React DOM.
npm install comins-table@0.2.2 react@19.3.0 react-dom@19.3.0Import the component and the optional default stylesheet.
import { useState } from "react";import { CominsTable, type CominsTableColumn } from "comins-table";import "comins-table/styles.css";
type PersonRow = { age: number; id: string; name: string; role: string;};
const columns: Array<CominsTableColumn<PersonRow>> = [ { field: "name", label: "Name", sort: true }, { field: "age", label: "Age", sort: true }, { field: "role", label: "Role" },];
export function PeopleTable() { const [data, setData] = useState<PersonRow[]>([ { age: 31, id: "p-1", name: "Alpha", role: "Admin" }, ]);
return ( <CominsTable columns={columns} data={data} getRowId={(row) => row.id} onChangeData={setData} /> );}CominsTable is controlled. Your application owns data; table-side edits call onChangeData, and your state update renders the next table state.
Comins Table is a client-only component and does not currently support server rendering.