Table renders read-only rows from a column list and row data.
ui.table({
{ key = 'component', label = 'Component' },
{ key = 'status', label = 'Status' },
{ key = 'note', label = 'Note' }
}, {
{
component = 'Controls',
status = 'interactive',
note = 'input, select, textarea, slider, button'
}
}, {
caption = 'LUI component status'
})
ui.table(columns, rows, props?)
Data shape
| Input | Shape |
|---|
columns | String array or { key, label }[]. Object columns also accept value as a key fallback. |
rows | Array of tables. Each column reads row[column.key]. |
| Prop | Description |
|---|
caption | Optional caption rendered below the table. |
tableClassName | Table element class. |
captionClassName | Caption class. |
headerClassName, theadClassName | Header group class. |
headerRowClassName | Header row class. |
headClassName, headerCellClassName, thClassName | Header cell classes. |
bodyClassName, tbodyClassName | Body class. |
rowClassName | Body row class. |
cellClassName, tdClassName | Body cell classes. |
Row keys come from row.id, row.key, or the row index.