Binhlaig logoBinhlaig UI
Components/Data Table

Data Table

Sorting, filtering, pagination, row selection, and column visibility powered by TanStack Table v8. Explore five working examples.

Installation

Install Data Table in your project.

Terminal
npx binhlaig-ui@latest add data-table

For project setup, installer selection, dependencies, and advanced installation instructions, see the Installation Guide.

View Installation Guide →Update or Overwrite →

Install Pagination

These tables use Binhlaig UI Pagination for page navigation. Install it alongside Data Table.

npx binhlaig-ui@latest add pagination
View Pagination documentation →

Import

import { DataTable, DataTableSortButton } from "@/components/ui/data-table"

1. Payments

The original example: email filtering, amount display, sorting, and selectable rows.

Columns
Status
Amount
Paidada@example.com
$249.00
Pendinglin@example.com
$125.00

Selected rows 0 / 3Page 1 / 2

2. Product inventory

Search products, sort stock counts, and display five products per page. Stock badges indicate low or empty stock.

ကုန်ပစ္စည်းနှင့် လက်ကျန်စာရင်း
ProductSKUPrice (MMK)
Rice 5 kgRICE-054218000 MMK
Cooking oilOIL-01812000 MMK
CoffeeCOF-01Out of stock6500 MMK
MilkMILK-01243500 MMK
TeaTEA-0152800 MMK

Total 7 · Page 1 / 2

3. Staff selection

Select staff with checkboxes, keep stable row IDs across pages, and toggle optional columns.

Select individual staff or all rows on the current page. Use Columns to hide optional fields.

Columns
Staff IDNameRoleStatus
ST-001Aung AungManagerActive
ST-002Su SuCashierActive
ST-003Hla HlaCashierInactive
ST-004Min MinKitchenActive
ST-005May MayServiceActive

Selected rows 0 / 6Page 1 / 2

4. Order filters and details

Filter orders by status, search by customer, and open an order's detail panel.

Columns
OrderCustomerStatusDetails
ORD-001Aung AungPending18500
ORD-002Su SuCompleted32000

Selected rows 0 / 4Page 1 / 2

5. Inline task updates

Change task status using a select input. The completed count updates immediately.

Completed tasks — 1 / 4

Columns
IDTaskAssigneeUpdate status
TASK-01Check stockAung Aung
TASK-02Prepare labelsSu Su
TASK-03Clean counterMin Min

Selected rows 0 / 4Page 1 / 2

Demo changes are stored in this page's React state and reset on refresh.