Getting StartedInstallation and setup guides 6
LayoutWorkflow and structural layout components 8
OverlayModal and floating layer surfaces 3
FeedbackStatus, empty, progress, and loading placeholder patterns 5
FormInput and selection components 25
UtilityGeneral-purpose interface utilities 7
NavigationMenu surfaces and hierarchical actions 7

Tree Table API

Import TngTreeTableComponent from @tailng-ui/components. Pass column definitions, a flat-but-hierarchical data array, and key/children accessors.

Inputs

NameTypeDefaultDescription
columns *readonly TngTreeTableColumn<TRow>[] Required. Column definitions. Mark one with treeToggle: true to place the indent/toggle in that column; first column is the fallback.
datareadonly TRow[][]Root-level rows. Children come from getChildren.
getKey(row: TRow, indexPath: number[]) => TngTreeTableKeyindex path join Stable identity function. Prefer a property accessor (row => row.id) for reliable expansion and focus tracking.
getChildren(row: TRow) => readonly TRow[] | null | undefinedreturns undefinedReturns child rows or null/undefined for leaf nodes.
expandedKeysreadonly TngTreeTableKey[][]Controlled expansion state. Pair with (expandedKeysChange).
selectedKeysreadonly TngTreeTableKey[][]Controlled selection state. Only meaningful when selectable is true.
loadingbooleanfalseShows a full-width loading row. Takes priority over the empty state.
disabledbooleanfalseDisables all interaction on every row.
selectablebooleanfalseEnables row selection via Space key or programmatically.
expandOnRowClickbooleanfalseClicking anywhere on an expandable row also toggles it.
emptyTextstring'No records found'Message shown in the empty-state row.
loadingTextstring'Loading...'Message shown in the loading-state row.
treeColumnKeystring | nullnull If no column has treeToggle: true, this key selects the tree column by id. The first column is the final fallback.
indentSizenumber20Pixels of indent per nesting level in the tree column.
ariaLabelstring | null'Tree table'Accessible label for the table element.
density'comfortable' | 'compact''comfortable'Controls cell vertical padding.
dir'ltr' | 'rtl' | nullnullText direction forwarded to the table element.

Outputs

NamePayloadDescription
expandedKeysChangereadonly TngTreeTableKey[] Emitted after expand or collapse. Always a new array — never mutates the input.
selectedKeysChangereadonly TngTreeTableKey[]Emitted after a selection toggle. Always a new array.
rowClickTngTreeTableRowEvent<TRow>Emitted when a row is clicked (always, not just on expansion).
rowExpandTngTreeTableRowEvent<TRow>Emitted when a row is expanded.
rowCollapseTngTreeTableRowEvent<TRow>Emitted when a row is collapsed.

Column definition — TngTreeTableColumn<TRow>

PropertyTypeDescription
keystringUnique column id. Used as a fallback property accessor on the row.
labelstringHeader cell text.
accessorkeyof TRow | ((row: TRow, index: number) => unknown)Data accessor. Falls back to row[column.key] when omitted.
treeToggleboolean When true, this column renders the indent spacer, expand/collapse button, and cell text inline.
align'start' | 'center' | 'end'Cell text alignment. Defaults to 'start'.
width, minWidth, maxWidthstring | number | nullCSS column width. Numbers are treated as px.
sticky'start' | 'end' | nullSticky column side (not rendered by default CSS — wire via custom CSS).
headerClassTngTreeTableClassInputExtra classes for the header cell.
cellClassTngTreeTableClassInput | ((row: TRow) => TngTreeTableClassInput)Extra classes for body cells. Use a function for row-driven styling.

Row event — TngTreeTableRowEvent<TRow>

PropertyTypeDescription
rowTRowThe original data row (same reference, not a copy).
keyTngTreeTableKeyThe stable key returned by getKey.
levelnumberZero-based nesting depth of the row.
originalEventEventThe originating DOM event (click, keydown, etc.).