Table
Plain styled table primitives for static and server-rendered tables.
Table is the shadcn-style primitive set for plain tables — no state, no
client logic. For sorting, filtering, pagination, selection, pinning and
virtualization use DataTable.
Installation
import {
Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption,
} from "@iammikz/srui";
Usage
| Name | Role | Status |
|---|---|---|
| Ada Lovelace | Admin | active |
| Grace Hopper | Editor | active |
| Alan Turing | Viewer | invited |
| 3 members | ||
Exports
| Export | Notes |
|---|---|
Table | overflow-x-auto wrapper + w-full table |
TableHeader / TableBody / TableFooter | Row groups; footer gets bg-muted/50 |
TableHead | th — uppercase, muted, scope="col" |
TableRow | border-b, hover highlight, data-state=selected styling |
TableCell | td |
TableCaption | Muted caption below the table |
Accessibility
Header cells carry scope="col"; the container scrolls horizontally without
clipping focus. Rows support data-state="selected" for selection styling.