Skip to main content

Table

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'
})

API

ui.table(columns, rows, props?)

Data shape

InputShape
columnsString array or { key, label }[]. Object columns also accept value as a key fallback.
rowsArray of tables. Each column reads row[column.key].

Props

PropDescription
captionOptional caption rendered below the table.
tableClassNameTable element class.
captionClassNameCaption class.
headerClassName, theadClassNameHeader group class.
headerRowClassNameHeader row class.
headClassName, headerCellClassName, thClassNameHeader cell classes.
bodyClassName, tbodyClassNameBody class.
rowClassNameBody row class.
cellClassName, tdClassNameBody cell classes.
Row keys come from row.id, row.key, or the row index.