Table API
Import TngTableComponent from @tailng-ui/components and pass column definitions plus row items.
Inputs
| Name | Type | Description |
|---|---|---|
columns | readonly TngTableColumn<TRow>[] | Column ids, labels, accessors, alignment, sorting, sticky position, truncation, and width. |
items | readonly TRow[] | Rows rendered into the table body. |
density | 'comfortable' | 'compact' | Controls vertical cell padding. |
layout | 'auto' | 'fixed' | Sets the native table layout mode. |
loading, error | boolean | Render full-width state rows. |
stickyHeader | boolean | Makes the header row sticky inside the scroll container. |
sortActive, sortDirection | string | null | Controlled sorting state forwarded to sortable headers. |
Outputs and templates
sortChangeemitsTngTableSortChangewhen a sortable header changes.ng-template[tngTableCellTemplate]customizes body cells by column id.ng-template[tngTableHeaderTemplate]customizes header cells by column id.