Installation
npx shadcn@latest add @iconiq/tableProps
Table
Root provider for the animated table primitives. It sets the shared column template so header and body rows stay aligned.
childrenReactNodeRequired
columnsstringDefault "minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr)"
classNamestringThe canonical JSX export is `Table`, and the lowercase `table` alias still ships for backward compatibility.
The file also exports `TABLE_DEFAULT_COLUMNS`, `TableAlign`, `TableRowVariant`, and `TableSortDirection` for stronger TypeScript reuse in app code.
The registry component no longer owns demo data, search state, or add/remove actions. Those behaviors are expected to live in app code.
The installed primitive now renders a native table, header, body, rows, and cells while preserving the original grid-driven layout API.
TableToolbar
Optional layout helper for the control row above the table, matching the original spacing and alignment treatment.
childrenReactNodeRequired
classNamestringTableHeader
Native table head wrapper for the column labels and sort controls.
childrenReactNodeRequired
classNamestringTableBody
Native table body wrapper that adds LayoutGroup and AnimatePresence so row insertions, removals, and reordering stay animated.
childrenReactNodeRequired
classNamestringExit animations for removed rows only run when body rows are rendered as direct children of TableBody.
TableRow
Motion-enabled native table row used for both header and body layouts.
variant"header" | "body"Default body
indexnumberDefault 0
hoverablebooleanclassNamestringMotion tr propsComponentPropsWithoutRef<typeof motion.tr>Every row reads the shared columns string from Table and applies it as grid-template-columns.
Rows expose `data-slot="table-row"`, plus `data-variant` and `data-hoverable`, which makes local styling overrides easier after installation.
TableHead
Native header cell wrapper for labels, sort buttons, and right-aligned controls.
align"left" | "right"Default left
childrenReactNodeRequired
classNamestringTableCell
Native body cell wrapper for row content, status pills, numeric values, and row actions.
align"left" | "right"Default left
childrenReactNodeRequired
classNamestringTableCaption
Low-emphasis native table caption below the table, matching the original entry count styling.
childrenReactNodeRequired
classNamestringTableEmpty
Animated empty-state row for zero-result or no-data states inside TableBody.
childrenReactNodeRequired
colSpannumberMotion tr propsComponentPropsWithoutRef<typeof motion.tr>TableSortButton
Optional header helper with a larger hit area, clearer active state, and direction animation.
activebooleanDefault false
direction"asc" | "desc"Default asc
align"left" | "right"Default left
childrenReactNodeRequired
classNamestringThe helper defaults to type='button', so it stays safe inside forms.
Registry bundle
Install the exact registry entry shown on the right when you want the component file and its declared runtime dependencies together.
Dependencies: motion, lucide-react.
This page lives in the Components section, but the install itself is the shared Iconiq table primitive rather than a Radix or Base UI table wrapper.
The provider switch is shown for section consistency, but both Radix UI and Base UI options are disabled because there is only one table install on this page.
The generated registry file is /r/table.json.