@burrow-ui/table
v0.1.7
Published
Generic data table for Burrow UI (typed columns, custom render, loading / empty states, row click)
Maintainers
Readme
@burrow-ui/table
Generic data table with typed columns, custom render, loading / empty states, and optional row-click.
import {Table, type TableColumn} from "@burrow-ui/table";
interface User {
id: number;
name: string;
email: string;
}
const columns: TableColumn<User>[] = [
{key: "name", header: "Name"},
{key: "email", header: "Email"},
{key: "actions", header: "", render: (u) => <button>Edit {u.name}</button>},
];
<Table columns={columns} data={users} onRowClick={(u) => console.log(u)} disableRowHover />;rowKey accepts a column name ("id") or a function — falls back to
item.id ?? item.key ?? index.
Clickable rows are keyboard-activatable with Enter / Space and expose
role="button". Use disableRowHover when a table remains interactive but
the surrounding surface already owns hover treatment.
