Choice UI Table Core - React table component library
npm install @choice-ui/table-coreA high-performance, extensible React table library built on TanStack Table.
``bash`
pnpm add @choice-ui/table-core
- Built on TanStack Table core
- Reactive state management (Legend State)
- Drag and drop sorting (dnd-kit)
- Cell selection and range fill
- Column pinning
- Row grouping and expansion
- Column resizing
- Undo/Redo support
- Virtual scrolling optimization
`tsx
import { TableCore, TableProvider } from "@choice-ui/table-core";
const columns = [
{ accessorKey: "name", header: "Name" },
{ accessorKey: "email", header: "Email" },
];
const data = [
{ name: "John", email: "john@example.com" },
{ name: "Jane", email: "jane@example.com" },
];
function App() {
return (
columns={columns}
width={800}
height={400}
/>
);
}
`
- TableCore - Main table componentTableProvider
- - Table context providerTablePane
- - Table paneTableScroll
- - Scroll containerTableHeader
- - Table headerTableBody
- - Table bodyTableRow
- - Table rowTableCell
- - Table cellTableFooter
- - Table footerFillHandle
- - Fill handle for cell range operations
- useTable - Get table instanceuseReactTable
- - Create table instanceuseCell
- - Cell stateuseHeader
- - Header stateuseCellEditing
- - Cell editinguseUpdateCell
- - Update cell valueuseRenderCell
- - Render cell contentusePosition
- - Position calculationuseCellHover
- - Cell hover stateuseRowHover
- - Row hover stateuseColumnHover
- - Column hover state
- PropsFeature - Props extensiondndFeature
- - Drag and drop functionalityagentFeature
- - Agent functionality
`ts``
import type {
RowData,
ColumnDef,
Row,
Column,
Header,
Cell,
TableOptions,
PaginationState,
TableState,
TableServerState,
TableCoreProps,
TableInstance,
} from "@choice-ui/table-core";
MIT