React Data Table

A typed, column-driven table for dense engineering data — lot tracking, test results, device inventories. Uppercase column headers, hairline row separators, right-aligned monospaced numerals, and custom cell renderers for status badges. No zebra stripes, no shadows: the restrained look of MES and EDA tooling.

Active wafer lots — Fab 2, updated 07:42 UTC
Lot IDProductStageWafersYieldStatus
LOT-24A118AXM-330Metal 2 Etch2594.2%In line
LOT-24A121AXM-330CMP Oxide2593.7%In line
LOT-24A097RFX-91Final Test2491.5%Complete
LOT-24A104AXM-330Implant Well25Hold
LOT-24A089PMU-12CWafer Sort2288.9%Complete
LOT-24A076RFX-913Scrapped

Installation

npx shadcn@latest add data-table.json

Usage

Define your row type once; columns are checked against it.

Loading...

Design notes

  • Numbers right-aligned, in mono — quantities and percentages align on the decimal, the convention in test reports and MES screens.
  • Status is icon + label — badge cells pair a dot with text, never color alone.
  • Empty state built in — zero rows renders a quiet "No data available." row spanning all columns.

Props

DataTable

PropTypeDefaultDescription
dataT[]Row objects
columnsColumn<T>[]Column definitions (see below)
captionstringOptional table caption, rendered below

Column

PropTypeDefaultDescription
headerstringColumn header text
accessorKeykeyof T \string
cell(item: T) => React.ReactNodeCustom cell renderer
align'left' \'center' \'right'
classNamestringExtra classes for header and cells