Table
Custom cell renderer: (row) => node.
Signature
Density
Viewport
Theme follows the navbar ☀/☾ toggleWhen to use
- Use it when Straightforward, sortable tabular data without heavy interaction.
- Reach for something else when Filtering, saved views or inline edit — use
DataGrid.
Accessibility
Rendered as a real <table> with header scopes; sortable columns expose aria-sort. Row selection and actions are keyboard reachable.
Import
const { Table } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
columns | TableColumn[] | Yes | |
rows | any[] | Yes | |
getRowKey | (row: any, index: number) => string | number | — | |
caption | React.ReactNode | — | |
density | "comfortable" | "compact" | — | compact tightens padding for dense reports. |
hoverable | boolean | — | |
isStriped | boolean | — | Subtle zebra striping. Default true. |
selectedKeys | (string | number)[] | — | |
onRowAction | (row: any) => void | — | |
sortDescriptor | SortDescriptor | — | |
onSortChange | (descriptor: SortDescriptor) => void | — | |
className | string | — |