Table
Server ComponentStyled semantic table primitives.
Import
tsx
import { Table } from "@cronus-ui/ui";
bash
npx cronus-ui add table
Examples
.cronus
The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.
default.cronus
app "audit-fixtures" {
port 5176
}
style {
preset aurora
theme dark
}
component TableDefault layout:inline style:table {
columns:3
label "default"
text "Invoice"
text "Status"
text "Amount"
text "INV-001"
text "Paid"
text "$250.00"
text "INV-002"
text "Pending"
text "$150.00"
}
page "/audit/table/default" type:custom {
use TableDefault
}
API Reference
Generated from the component's exported types.
TableProps
Extends HTMLAttributes<HTMLTableElement>
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |
TableHeaderProps
Extends HTMLAttributes<HTMLTableSectionElement>
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |
TableBodyProps
Extends HTMLAttributes<HTMLTableSectionElement>
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |
TableFooterProps
Extends HTMLAttributes<HTMLTableSectionElement>
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |
TableRowProps
Extends HTMLAttributes<HTMLTableRowElement>
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |
TableHeadProps
Extends ThHTMLAttributes<HTMLTableCellElement>
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Contents of the component. |
className | string | — | Additional class names merged onto the root. |
colSpan | number | — | — |
rowSpan | number | — | — |
TableCellProps
Extends TdHTMLAttributes<HTMLTableCellElement>
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Contents of the component. |
className | string | — | Additional class names merged onto the root. |
colSpan | number | — | — |
rowSpan | number | — | — |
TableCaptionProps
Extends HTMLAttributes<HTMLTableCaptionElement>
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |