A bare data table: describe `columns` once (a `title` plus a `dataIndex` or a custom `render`), pass `data`, get a `<table>` back. No sorting, pagination or empty state — add those around it.

pnpm add @behivetech/atoms.table

This is the snapshot of v0.2.5, the current version, as recorded on 2026-11-10. The live page runs its examples →

A bare data table: describe columns once (a title plus a dataIndex or a custom render), pass data, get a <table> back. No sorting, pagination or empty state — add those around it.

Usage

1import { Table } from "@behivetech/atoms.table";
2
3function Example() {
4 const columns = [
5 { key: "name", title: "Name", dataIndex: "name" },
6 { key: "status", title: "Status", dataIndex: "status" },
7 ];
8 const data = [
9 { id: "1", name: "Hero banner", status: "Published" },
10 { id: "2", name: "Pricing table", status: "Draft" },
11 ];
12 return <Table columns={columns} data={data} rowKey={(row) => row.id} />;
13}

Properties

Table props

PropTypeDefaultDescription
columns*TableColumn<TRow>[]—Column definitions, rendered left to right
data*TRow[]—Rows to render, in the order given — Table does not sort, paginate, or filter
rowKey*(row: TRow) => string—Returns a stable, unique key for a row, used as its React key
classNamestring—Additional class names to merge with the component root element