A high-performance, feature-rich React data grid component.
npm install nin-tablebash
npm install nin-table
`
Usage
`tsx
import React, { useMemo } from 'react';
import { Table, ColumnDef } from 'nin-table';
import 'nin-table/dist/nin-table.css';
interface User {
id: number;
name: string;
role: string;
}
const App = () => {
const data = useMemo(() => [
{ id: 1, name: 'John Doe', role: 'Developer' },
{ id: 2, name: 'Jane Smith', role: 'Designer' },
], []);
const columns: ColumnDef[] = useMemo(() => [
{ key: 'id', header: 'ID', width: 50 },
{ key: 'name', header: 'Name', width: 150 },
{ key: 'role', header: 'Role', width: 150 },
], []);
return (
dataSource={data}
columns={columns}
rowKey="id"
/>
);
};
`
Documentation
For full API documentation, see API.md`