Components › Display

Table

Ruled data table parts with selectable rows and a sortable header button.

Installation

npx plankui@latest add table

Usage

import { Table } from "@/components/ui/table";

<Table>
  <TableHeader><TableRow><TableHead>Name</TableHead></TableRow></TableHeader>
  <TableBody><TableRow><TableCell>Ana</TableCell></TableRow></TableBody>
</Table>

API reference

PropTypeDefaultDescription
TableRow data-state"selected"Highlights a selected row.
TableSortButton.direction"asc" | "desc" | falseCurrent sort.
...propsnative table element propsEvery part forwards them.

View the source on GitHub