Table
Flexible table components for displaying structured data with sorting, selection, and expansion.
Name | Age | Address |
|---|---|---|
| John Brown | 32 | New York No. 1 Lake Park |
| Jim Green | 42 | London No. 1 Lake Park |
| Joe Black | 32 | Sydney No. 1 Lake Park |
1import {2 Table,3 TableHeader,With Tags & Actions
Name | Age | Address | Tags | Action |
|---|---|---|---|---|
| John Brown | 32 | New York No. 1 Lake Park | nicedeveloper | |
| Jim Green | 42 | London No. 1 Lake Park | loser | |
| Joe Black | 32 | Sydney No. 1 Lake Park | coolteacher |
1<Table>2 <TableHeader>3 <TableRow>Striped
Name | Age | Address |
|---|---|---|
| John Brown | 32 | New York No. 1 Lake Park |
| Jim Green | 42 | London No. 1 Lake Park |
| Joe Black | 32 | Sydney No. 1 Lake Park |
1<Table variant="striped">...</Table>With Row Headers & Footer
Column 1 | Column 2 | Column 3 | |
|---|---|---|---|
Row 1 | R1C1 | R1C2 | R1C3 |
Row 2 | R2C1 | R2C2 | R2C3 |
Row 3 | R3C1 | R3C2 | R3C3 |
Footer | FC1 | FC2 | FC3 |
1<Table variant="bordered">2 <TableHeader>3 <TableRow>Expandable Rows
| Title | Description |
|---|---|
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";23const columns = [Data Table with Selection & Sorting
Item | Price | Condition | Watchers | Actions | |
|---|---|---|---|---|---|
📺 55 Inches Smart TV Class D-Series SKU: A43BTR5678 · Quantity: 1 | $674.99 | New with box ▾ | 24 | ||
📺 40 Inches Smart TV Class D-Series SKU: A43BTR5678 · Quantity: 1 | $674.99 | New with box ▾ | 43 | ||
🖥️ 43" Class 4K UHD 2160P webOS SKU: A43BTR5678 · Quantity: 1 | $574.99 | New without box ▾ | 17 | ||
🖥️ 32" inch 1080p Full HD 60Hz LED SKU: A43BTR5678 · Quantity: 1 | $324.99 | New with box ▾ | 9 |
1import { TableData } from "@/zeroui/components/tables";23const columns = [Installation
npx zeroui@latest add tableProps
| name | type | default | description |
|---|---|---|---|
| variant | "default" | "striped" | "bordered" | "default" | - |
| size | "sm" | "md" | "lg" | "md" | - |
| selectable | boolean | false | - |
| selectedRows | (string | number)[] | [] | - |
| onSelectionChange | (ids: (string | number)[]) => void | - | - |
| stickyHeader | boolean | false | - |
| striped | boolean | false | - |