Table
Rows of records with their numbers lined up. One highlight glides from row to row, picked rows join into one block, and rows glide to their new places as they are sorted, added or removed.
Examples
Default
Pick rows, sort by date or amount, archive and restore: rows glide to their new places, and the empty state takes their place without the page jumping.
Data
Search, filter by status, sort by a column or Shift-click to add another, pick rows across pages with Shift for a range, and hide columns: useTableData does the work in the browser.
Server
The same table with a server doing the work: the hook hands over the whole view as one object to fetch with, and the rows there are stay while the next ones load, with a line sliding under the header.
Expandable rows
Each order opens a TableDetail under it with its items; the rows below glide to make room.
Sub-rows
Each team holds its people as rows of its own, indented and sorted with it; a search opens the teams whose people match.
Resizable columns
Drag a column’s edge, or focus it and press the arrow keys, to resize it; the name and the actions stay in view as the rest scrolls.
Lined
variant="lined" draws a hairline between rows and a square highlight, for dense records read across.
Sticky header
A max-h- on containerClassName makes a tall table scroll in its box under a header that stays.
Installation
npx shadcn@latest add https://kinoui.com/r/table.json- Files
lib/reduce-motion.tslib/scroll.tslib/refs.tslib/resize.tslib/swap.tsxlib/popup.tslib/glide.tsxcomponents/kino/tooltip.tsxlib/cut.tsxcomponents/kino/spinner.tsxcomponents/kino/button.tsxcomponents/kino/collapsible.tsxlib/run-progress.tslib/highlight.tslib/flow.tslib/track.tscomponents/kino/progress.tsxlib/placeholder.tscomponents/kino/skeleton.tsxlib/announce.tsxlib/controllable.tslib/dates.tslib/table-data.tsxcomponents/kino/table.tsx- Packages
@base-ui/react@tanstack/react-table@~9.3.1class-variance-authority- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
Table
TableRow
TableHead
TableCell
TableExpand
TableDetail
TableEmpty
TableSkeleton
useTableData
Data attributes
CSS variables
Accessibility
- A
TableExpandsays whether its row is open witharia-expanded, and points at its detail row witharia-controls. - A resize handle is a separator that takes focus: the arrow keys resize its column, Shift for farther, Home and End to its bounds, Enter puts it back, and it reads out its width. Focus that lands under a sticky column scrolls clear of it.
- Give every table a
TableCaption: it names the table, and the scrolling box takes the same name. - A box whose content is larger than it takes focus, so the arrow keys scroll it. When it stops scrolling, focus moves to the table’s first control.
- A picked row is tinted and, in forced colours, takes the system’s highlight colour. Pair it with a checkbox, so the state isn’t shown by colour alone.
- A
TableHeadwithonSortholds a button, andaria-sorton the column sorted first. A screen reader hears each sort and page turn fromstatus, and the Search field reads out how many rows match. - The checkboxes sit in a
CheckboxGroupgivenselection: the box in the header picks this page, and Shift with a row’s box picks the rows from the last one pressed. - While new rows load, the table is busy, and the rows there stay until the new ones arrive.
- When the system asks for less motion, rows and columns move at once and only fade.