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

NameRoleStatus
Ada LovelaceAdminactive
Grace HopperEditoractive
Alan TuringViewerinvited
3 members

Exports

ExportNotes
Tableoverflow-x-auto wrapper + w-full table
TableHeader / TableBody / TableFooterRow groups; footer gets bg-muted/50
TableHeadth — uppercase, muted, scope="col"
TableRowborder-b, hover highlight, data-state=selected styling
TableCelltd
TableCaptionMuted 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.