AkiTable
Akitable is a feature-rich table component for displaying, editing, and interacting with tabular data.
Installation
pnpm add @akinon/akitableBasic Usage
import { Akitable, type AkitableColumn, type AkitableData } from '@akinon/akitable';
import { useAkilocale } from '@akinon/akilocale';
interface Product {
id: number;
name: string;
price: number;
status: string;
}
export const ProductTable = () => {
const { locale } = useAkilocale();
const columns: AkitableColumn[] = [
{
title: 'Name',
dataIndex: 'name',
key: 'name'
},
{
title: 'Price',
dataIndex: 'price',
key: 'price',
render: (value: number) =>
new Intl.NumberFormat(locale.lng, { style: 'currency', currency: 'USD' }).format(value)
},
{
title: 'Status',
dataIndex: 'status',
key: 'status'
}
];
const data: Product[] = [
{ id: 1, name: 'Product A', price: 29.99, status: 'Active' },
{ id: 2, name: 'Product B', price: 49.99, status: 'Inactive' },
{ id: 3, name: 'Product C', price: 19.99, status: 'Active' }
];
return (
<Akitable
columns={columns}
data={data}
rowKey="id"
/>
);
};Props
Prop
Type
Description
Pagination
Paginated Data Format
Page Sizes
Column Configuration
Basic Columns
Sortable Columns
Editable Columns
Bulk Actions
Header Configuration
Header Props
Prop
Type
Description
Footer Configuration
Row Events
Row Click
Row Status
Loading State
Complete Example
Internationalization
Best Practices
Last updated
Was this helpful?

