A powerful React table component with extensive features.
Project details
ka-table is a lightweight React table component that provides sorting, filtering, grouping, and virtualization capabilities. Its flexible design and comprehensive theming options make it ideal for both simple and complex data displays, enhancing the user experience while maintaining application performance.
ka-table is a fully-featured and lightweight React data grid offering extensive capabilities such as sorting, filtering, grouping, tree data, editing, and virtual scrolling, with every component designed for customization.
childComponents, allowing for tailored implementations based on specific project needs.useTable hook, actions can be dispatched to manage state changes effectively, or the state can be maintained in Redux, URLs, or a server.any, thus enhancing the development experience.To illustrate the basic integration of ka-table, the following example demonstrates a simple table setup:
import 'ka-table/style.css';
import React from 'react';
import { Table } from 'ka-table';
import { DataType, EditingMode, SortingMode } from 'ka-table/enums';
const dataArray = Array(10)
.fill(undefined)
.map((_, index) => ({
column1: `column:1 row:${index}`,
column2: `column:2 row:${index}`,
column3: `column:3 row:${index}`,
column4: `column:4 row:${index}`,
id: index,
}));
const OverviewDemo = () => {
return (
<Table
columns={[
{ key: 'column1', title: 'Column 1', dataType: DataType.String },
{ key: 'column2', title: 'Column 2', dataType: DataType.String },
{ key: 'column3', title: 'Column 3', dataType: DataType.String },
{ key: 'column4', title: 'Column 4', dataType: DataType.String },
]}
data={dataArray}
editingMode={EditingMode.Cell}
rowKeyField={'id'}
sortingMode={SortingMode.Single}
/>
);
};
export default OverviewDemo;
ka-table allows easy theming through CSS custom properties. Each aspect of the table's appearance can be extended or overridden in the CSS to align with project branding:
/* Example of a dark theme for all tables */
.ka {
--ka-background-color: #2c2c2c;
--ka-border-color: #4d4d4d;
--ka-color-base: #fefefe;
--ka-thead-background-color: #1b1b1b;
--ka-thead-color: #c5c5c5;
}
For detailed documentation, demos, and further information, refer to the official site and the documentation. This project is an ideal choice for teams looking for a reliable, versatile, and customizable table solution in React.
Comments
0Start the conversation
Share the first comment.