Shadcn-style Data Table
DataShadcn-style data table for React. Paginated, searchable data table with sortable columns and loading state.
Data TableData · Web
Loading Storybook preview…
Installation
bun add @otfdashkit/ui
Usage
Import DataTable from @otfdashkit/ui.
Code
// Data Table — Shadcn-style data table for React. Paginated, searchable data table with sortable columns and loading state.
//
// Install:
// bun add @otfdashkit/ui
import { DataTable } from '@otfdashkit/ui'
export function Example() {
return (
<DataTable>
{/* your content */}
</DataTable>
)
}Props
Props declared in the DataTable source. Inherited HTML attributes are not listed.
| Prop | Type | Default | Description |
|---|---|---|---|
| columnsrequired | ColumnDef<T>[] | ||
| datarequired | T[] | ||
| loading | boolean | ||
| pageSize | number | 10 | |
| searchColumn | string | ||
| searchable | boolean |