Data Table
Displays data in rows and columns with sorting, pagination, and custom templates.
Financial Ledger
| Transaction ID | Date | Amount | Status |
|---|---|---|---|
| TX-1001 | 2023-01-15 | $1,500.00 | |
| TX-1002 | 2023-01-16 | -$450.50 | |
| TX-1003 | 2023-01-17 | $3,200.00 |
Team Roster
| Employee | Role | Status | Actions |
|---|---|---|---|
Sarah Connor | Frontend Lead | ||
John Doe | Product Designer | ||
Jane Smith | DevOps Engineer |
Inventory
| Preview | Product | Category | Stock | Price |
|---|---|---|---|---|
| Gaming Laptop | Electronics | 12 | 1299 | |
| Mech Keyboard | Accessories | 0 | 149 | |
| Wireless Mouse | Accessories | 55 | 89 |
Single Selection
Selected:None
| Name | Role | Status | |
|---|---|---|---|
| Alice Johnson | Engineer | ||
| Bob Williams | Designer | ||
| Charlie Brown | Manager | ||
| David Smith | Developer | ||
| Eve White | Product Owner |
Multiple Selection
Selection Count:0
| Name | Role | Status | |
|---|---|---|---|
| Alice Johnson | Engineer | ||
| Bob Williams | Designer | ||
| Charlie Brown | Manager | ||
| David Smith | Developer | ||
| Eve White | Product Owner |
Empty State
| Name | Role | Status |
|---|---|---|
| Temporary Data | Tester |
Component API
| Name | Type | Default | Description |
|---|---|---|---|
data | T[] | [] | Array of data to display in the table. |
columns | PrismColumn<T>[] | [] | Column definitions including keys, headers, and optional templates. |
striped | boolean | false | Enable alternating row background colors. |
gridlines | boolean | false | Show borders between cells. |
size | 'sm' | 'md' | 'lg' | 'md' | Size of the table rows and padding. |
width | string | '100%' | Width of the table container (e.g., "100%", "500px"). |
paginator | boolean | false | Enable pagination controls. |
rows | number | 10 | Number of rows per page when paginator is enabled. |
selectionMode | 'single' | 'multiple' | null | Enable row selection. |
selection | T | T[] | null | Two-way binding for selected row(s). |
dataKey | string | null | Property to uniquely identify a row (required for selection). |