hiip/ui

Components / Data

Data Table

A TanStack table shell: column pinning, drag-to-reorder, a selection rail and skeleton rows.

Install — needs @hiip registered in components.json

bunx shadcn@latest add @hiip/data-table

Or by URL, with the token in the query

bunx shadcn@latest add "https://ui.hiip.ai/r/data-table.json?token=$HIIP_REGISTRY_TOKEN"

Both need a token — set one up.

Anatomy

Import from components/ui/hiip-ui/data-table.

<DataTable
  table={…}        // a TanStack table instance the CALLER builds
  rowKey={…}
  emptyTitle="…"
  emptyHint="…"
/>

Examples

Mai KhanhtiktokNegotiating
Duy AnhwhatsappReplied
NurulviberClosed
3 creators
Page 1 of 1

API Reference

Generated from the source. Props forwarded to the underlying element are not listed.

DataTable

The app's data-table shell: a `@tanstack/react-table` instance rendered through this repo's own `ui/table` primitives.

PropTypeDefault
emptyHintrequiredstring
emptyIconrequiredIconSvgElement
emptyTitlerequiredstring
footerLabelrequired

Left side of the pager, e.g. "12 of 40 creators".

ReactNode
rowKeyrequired

Stable row key — the index is not one once sorting moves rows around.

(row: Row) => string | number
tablerequiredTable<Row>
autoHeight

Size the box to its ROWS instead of filling the space its parent gives it.

boolean | undefined
classNamestring | undefined
columnRules

Draw a hairline between every column — see `COLUMN_RULE`.

boolean | undefined
disabled

Freeze the PAGER while the page is busy — a load in flight, or a write that will change what is on the page.

boolean | undefined
error

A load FAILURE, never "nothing matched" — see the note on the error row below.

string | null | undefined
isLoadingboolean | undefined
manualPager

Server-cursor pagination: the caller owns both edges, and the TOTAL IS UNKNOWN.

{ pageIndex: number; hasNextPage: boolean; onPrevious: () => void; onNext: () => void; } | undefined
onRowClick((row: Row) => void) | undefined
pinnedThrough

How far the frozen run reaches — the id of the LAST pinned column.

string | null | undefined

DataTableColumnsMenu

The Columns control: which columns are drawn, in what ORDER, and how far the freeze reaches.

PropTypeDefault
tablerequiredTable<Row>
pinning

Omit and the panel is show/hide + reorder only, with no freeze controls.

DataTablePinning | undefined
Type
registry:ui
Pulls in
button, checkbox, popover, skeleton, tableshadcn installs these for you if they are missing.
npm packages
@tanstack/react-table @dnd-kit/core @dnd-kit/sortable @dnd-kit/utilities @hugeicons/react @hugeicons/core-free-icons
Files written
  • components/ui/hiip-ui/data-table.tsx