Free, Tiny & Powerful Data Grid Library
A production-ready, framework-agnostic table library with a headless architecture. Build powerful data tables with advanced features while maintaining complete control over your UI.
Liji Table uses a unique headless-first architecture that separates business logic from rendering:
@liji-table/core (Framework-agnostic engine)
β
βββ @liji-table/react (React hooks)
βββ @liji-table/angular (Angular + RxJS)
βββ @liji-table/ui (Pre-built React components)
- π Sorting - Natural sort with ascending/descending/none states
- π Filtering - Global search + column-level filters
- π Pagination - Flexible page size and navigation
βοΈ Column Resizing - Performance-optimized with direct DOM manipulation- π§© Column Reordering - Drag-and-drop support
- π§² Column Pinning - Pin columns to left or right with auto-reorder
- β Row Selection - Individual and bulk selection
- π Row Grouping - Hierarchical data grouping with expand/collapse
- π Virtualization - Built-in virtual scrolling for large datasets
- π€ CSV Export - Export filtered and sorted data
- πΎ Layout Persistence - Save column order/width/pin/hidden/align to
localStorageand restore it automatically next time - π Auto-Fit Column Widths - Un-resized columns fill the container by default; resizing one column never shifts any other
- β‘ Performance - Optimized for large datasets with minimal re-renders
- π― TypeScript - Fully typed with comprehensive type definitions
| Package | Version | Description |
|---|---|---|
@liji-table/core |
0.0.10 | Framework-agnostic table engine |
@liji-table/react |
0.0.10 | React hooks for table management |
@liji-table/angular |
0.0.10 | Angular components with RxJS |
@liji-table/ui |
0.0.10 | Pre-built React UI components |
npm install @liji-table/react @liji-table/coreimport { useLijiTable } from '@liji-table/react';
function MyTable({ data }) {
const table = useLijiTable(data, [
{ id: 'name', label: 'Name', sortable: true },
{ id: 'email', label: 'Email', sortable: true },
{ id: 'role', label: 'Role' }
]);
return (
<table>
<thead>
<tr>
{table.visibleColumns.map((col, i) => (
<th
key={col.id}
{...table.getHeaderProps(i, col.id)}
onClick={() => table.toggleSort(col.id)}
>
{col.label}
<span {...table.getResizerProps(col.id)} />
</th>
))}
</tr>
</thead>
<tbody>
{table.rows.map(row => (
<tr key={row.id}>
{table.visibleColumns.map(col => (
<td key={col.id}>{row[col.id]}</td>
))}
</tr>
))}
</tbody>
</table>
);
}npm install @liji-table/angular @liji-table/coreimport { UniversalTable } from '@liji-table/angular';
export class MyComponent {
table = new UniversalTable(this.data, [
{ id: 'name', label: 'Name', sortable: true },
{ id: 'email', label: 'Email', sortable: true },
{ id: 'role', label: 'Role' }
]);
}<liji-table
[table]="table"
[showCheckboxes]="true"
[enableStriped]="true">
</liji-table>npm install @liji-table/coreimport { LijiTable } from '@liji-table/core';
const table = new LijiTable(data, columns);
// Subscribe to state changes
table.subscribe(state => {
console.log('Table state updated:', state);
renderTable(table.getRows());
});
// Perform actions
table.setSearch('query');
table.toggleSort('name');
table.setPageSize(20);- Core Package - Framework-agnostic engine
- React Package - React hooks and examples
- Angular Package - Angular components
- UI Package - Pre-built components
All packages are thoroughly tested with Vitest:
npm testCurrent Test Status: β
All 65 tests passing across core, react, and angular
See CHANGELOG.md for the full list.
- Layout persistence -
persistKey/autoPersistoptions andsaveLayout()/resetLayout()/hasSavedLayout()on the React hook and the AngularUniversalTableclass.@liji-table/uiand<liji-table>show "Save Layout" / "Reset Layout" in the column context menu whenpersistKeyis set. The core engine exposesgetLayoutSnapshot()/applyLayoutSnapshot()for custom storage. - Density toggle in the column menu - Compact / Comfortable is now switched from the right-click column menu in
@liji-table/uiand<liji-table>(Angular exposes[(density)]). - Full core parity on the bindings - the React hook and Angular
UniversalTableexpose multi-column sorting, advanced filters, row grouping, inline editing and layout snapshots. - Recursive
expandAll()- expands every level of multi-level grouping.
- Zero-shift column resizing: only the column being dragged changes width.
- Vertical grid lines and a text-only, compact context menu in
@liji-table/uiand<liji-table>. setData()clamps the page index when the new dataset has fewer pages, andgetCSVContent()writesnull/undefinedcells as empty strings.
# Install dependencies
npm install
# Build all packages
npm run build
# Run tests
npm test
# Watch mode
npm test -- --watchCheck the examples/ directory for:
- Basic table implementation
- Advanced features (grouping, pinning, virtualization)
- Custom renderers
- Integration examples
Contributions are welcome! Please feel free to submit a Pull Request.
MIT Β© 2026
// Correctly sorts: ["Item 1", "Item 2", "Item 10"]
// Not: ["Item 1", "Item 10", "Item 2"]
table.toggleSort('name');// Pin column to left - automatically moves to start
table.pinColumn('id', 'left');
// Pin column to right - automatically moves to end
table.pinColumn('actions', 'right');
// Unpin - moves back to middle section
table.pinColumn('name', null);// Group by single or multiple columns
table.setGrouping(['department', 'role']);
// Expand/collapse groups
table.toggleGroup(groupRow.groupKey); // use the groupKey of a group row from table.getRows()
table.expandAll();
table.collapseAll();// Automatically handles thousands of rows
const { virtualRows, virtualPaddingTop, virtualPaddingBottom } = table;// Export filtered and sorted data
table.downloadCSV('users.csv');Built by Lijish for developers who need powerful tables without the bloat
