Table

Flexible table components for displaying structured data with sorting, selection, and expansion.

Name
Age
Address
John Brown32New York No. 1 Lake Park
Jim Green42London No. 1 Lake Park
Joe Black32Sydney No. 1 Lake Park
1import {
2 Table,
3 TableHeader,

With Tags & Actions

Name
Age
Address
Tags
Action
John Brown32New York No. 1 Lake Park
nicedeveloper
Jim Green42London No. 1 Lake Park
loser
Joe Black32Sydney No. 1 Lake Park
coolteacher
1<Table>
2 <TableHeader>
3 <TableRow>

Striped

Name
Age
Address
John Brown32New York No. 1 Lake Park
Jim Green42London No. 1 Lake Park
Joe Black32Sydney No. 1 Lake Park
1<Table variant="striped">...</Table>

With Row Headers & Footer

Column 1
Column 2
Column 3
Row 1
R1C1R1C2R1C3
Row 2
R2C1R2C2R2C3
Row 3
R3C1R3C2R3C3
Footer
FC1FC2FC3
1<Table variant="bordered">
2 <TableHeader>
3 <TableRow>

Expandable Rows

TitleDescription
Item 1
First top-level item
Item 2
Second top-level item
Item 2.1
Child of Item 2
Item 2.2
Another child of Item 2
Item 3
Third top-level item
1import { TableExpandable } from "@/zeroui/components/tables";
2
3const columns = [

Data Table with Selection & Sorting

Item
Price
Condition
Watchers
Actions
📺

55 Inches Smart TV Class D-Series

SKU: A43BTR5678 · Quantity: 1

$674.99New with box24
📺

40 Inches Smart TV Class D-Series

SKU: A43BTR5678 · Quantity: 1

$674.99New with box43
🖥️

43" Class 4K UHD 2160P webOS

SKU: A43BTR5678 · Quantity: 1

$574.99New without box17
🖥️

32" inch 1080p Full HD 60Hz LED

SKU: A43BTR5678 · Quantity: 1

$324.99New with box9
1import { TableData } from "@/zeroui/components/tables";
2
3const columns = [

Installation

npx zeroui@latest add table

Props

nametypedefaultdescription
variant"default" | "striped" | "bordered""default"-
size"sm" | "md" | "lg""md"-
selectablebooleanfalse-
selectedRows(string | number)[][]-
onSelectionChange(ids: (string | number)[]) => void--
stickyHeaderbooleanfalse-
stripedbooleanfalse-