Table
A responsive data table for presenting tabular information with custom row highlights, headers, status badges, and captions.
import
import { Table } from "@/components/ui/table/table";$
npx @bloomui-react/cli add tabletable.tsx
Default
Standard data table layout.
| Invoice | Status | Method | Amount |
|---|---|---|---|
| INV-001 | Paid | Credit Card | $250.00 |
| INV-002 | Pending | PayPal | $150.00 |
| INV-003 | Unpaid | Bank Transfer | $350.00 |
| Total | $750.00 | ||
Selected Row Highlights
Mark rows with data-state=selected for interactive data selection.
data-state: anyselected: any
| Customer | Role | |
|---|---|---|
| Guilherme Bus | gui@example.com | Admin |
| Ana Silva | ana@example.com | Developer |
Zebra Striping
Alternate background shading for even table rows using striped={true}.
striped: boolean
| ID | Product Name | Category | Price |
|---|---|---|---|
| #101 | Pro Mac M3 Max | Hardware | $3,499.00 |
| #102 | Ultrawide Monitor 49" | Displays | $1,299.00 |
| #103 | Ergonomic Chair | Furniture | $599.00 |
| #104 | Mechanical Keyboard | Accessories | $199.00 |
Compact Density
Reduce padding inside table cells for dense data grids using density=compact.
density:
default | compact| System Metric | Current Value | Status |
|---|---|---|
| CPU Utilization | 42.8% | Optimal |
| Memory Usage | 11.4 GB / 32 GB | Normal |
| Disk I/O Rate | 485 MB/s | Elevated |
| Network Bandwidth | 1.2 Gbps | Active |
Sticky Header & Sticky First Column
Freeze table headers at top during vertical scrolling and freeze the first column during horizontal scrolling.
stickyHeader: booleanstickyFirstColumn: booleanisSticky: booleanisStickyColumn: boolean
| Member | Q1 Sales | Q2 Sales | Q3 Sales | Q4 Sales | Annual Total | Performance Rating |
|---|---|---|---|---|---|---|
| Engineer #1 | $45,200 | $52,400 | $61,000 | $74,800 | $233,400 | Exceeds |
| Engineer #2 | $45,200 | $52,400 | $61,000 | $74,800 | $233,400 | Exceeds |
| Engineer #3 | $45,200 | $52,400 | $61,000 | $74,800 | $233,400 | Exceeds |
| Engineer #4 | $45,200 | $52,400 | $61,000 | $74,800 | $233,400 | Exceeds |
| Engineer #5 | $45,200 | $52,400 | $61,000 | $74,800 | $233,400 | Exceeds |
| Engineer #6 | $45,200 | $52,400 | $61,000 | $74,800 | $233,400 | Exceeds |
| Engineer #7 | $45,200 | $52,400 | $61,000 | $74,800 | $233,400 | Exceeds |
| Engineer #8 | $45,200 | $52,400 | $61,000 | $74,800 | $233,400 | Exceeds |
API Reference
Props — Table
Supported properties for Table elements.
| Element | Description |
|---|---|
| <Table /> | Outer table wrapper with scrollable card border container. |
| <TableHeader /> | Header row container <thead>. |
| <TableRow /> | Table row <tr> with hover and selected highlights. |
| <TableCell /> | Standard data cell <td>. |