Table

unreleasedstable

Presentational native table anatomy for readable data.

API Reference
tsxUsage
import {
  Table,
  TableBody,
  TableCell,
  TableContainer,
  TableHead,
  TableHeader,
  TableRow,
} from "@/components/ui/table";
 
export function Component() {
  return (
    <TableContainer>
      <Table>
        <TableHeader>
          <TableRow>
            <TableHead>Item</TableHead>
          </TableRow>
        </TableHeader>
        <TableBody>
          <TableRow>
            <TableCell>Registry source</TableCell>
          </TableRow>
        </TableBody>
      </Table>
    </TableContainer>
  );
}

TableContainer

Overflow wrapper that carries table container styling and CardFrame clipping hooks.

PropTypeDefault
classstring-
<TableContainer>
  <Table>
    <TableHeader>...</TableHeader>
    <TableBody>...</TableBody>
  </Table>
</TableContainer>

Table

Native table root with Keystone density, caption, and tabular-number styling.

PropTypeDefault
classstring-
<Table>
  <TableCaption>Caption</TableCaption>
  <TableHeader>...</TableHeader>
  <TableBody>...</TableBody>
</Table>

TableHeader

Native header section containing column headers.

PropTypeDefault
classstring-
<TableHeader>
  <TableRow>
    <TableHead scope="col">Header</TableHead>
  </TableRow>
</TableHeader>

TableBody

Native body section containing table rows and data cells.

PropTypeDefault
classstring-
<TableBody>
  <TableRow>
    <TableCell>Cell</TableCell>
  </TableRow>
</TableBody>

TableFooter

Native footer section for totals, summaries, or aggregate rows.

PropTypeDefault
classstring-
<TableFooter>
  <TableRow>
    <TableCell colSpan={3}>Total</TableCell>
    <TableCell class="text-right">$39,550</TableCell>
  </TableRow>
</TableFooter>

TableRow

Native row part with hover and selected-state styling hooks.

PropTypeDefault
classstring-
data-state"selected" | string-
data-selectedstring-
<TableRow data-state="selected">
  <TableCell>Selected row</TableCell>
</TableRow>

TableHead

Native header cell for column labels.

PropTypeDefault
classstring-
scope"col" | "row" | "colgroup" | "rowgroup"-
<TableHead class="text-right" scope="col">
  Budget
</TableHead>

TableCell

Native data cell for row values.

PropTypeDefault
classstring-
colSpannumber-
<TableCell class="text-right font-medium tabular-nums">
  $12,500
</TableCell>

TableCaption

Native caption part for readable table summaries.

PropTypeDefault
classstring-
<TableCaption>A list of current projects.</TableCaption>

Keystone UI is a new, modern UI component library for SolidJS.

Back to top