Component · C-037
Table
The system's native table. It supplies the semantics —caption, thead, th with scope and cells— and leaves density, borders and horizontal scroll to the tokens. It does not sort or paginate: that is DataTable's job.
Install
Install koten-theme first when the project has no Koten tokens yet.
npx shadcn@latest add https://koten.codehive.com.co/r/table.jsonAccessibility
- The scroll container gets tabIndex=0 so it can be traversed with the keyboard.
- TableHead sets scope="col"; the first cell of a row can be a th with scope="row".
- The caption describes the table; TableCaption hides it visually without removing it from the accessibility tree.