Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Nettalco/nettalco-theme/llms.txt

Use this file to discover all available pages before exploring further.

The TreeTable component renders hierarchical data in a familiar table layout where each row can be expanded to reveal child rows. It shares many structural token sections with DataTableheader, headerCell, row, bodyCell, footerCell, and footer — but adds a nodeToggleButton for expanding and collapsing tree nodes in place of the rowToggleButton.

Angular Usage Example

<p-treeTable
  [value]="treeNodes"
  [paginator]="true"
  [rows]="10"
  selectionMode="single"
  [(selection)]="selected"
>
  <ng-template pTemplate="header">
    <tr>
      <th pSortableColumn="name" ttSortableColumn="name">
        Name <p-sortIcon field="name" />
      </th>
      <th>Size</th>
      <th>Type</th>
    </tr>
  </ng-template>

  <ng-template pTemplate="body" let-rowNode let-rowData="rowData">
    <tr [ttRow]="rowNode" [ttSelectableRow]="rowNode">
      <td>
        <p-treeTableToggler [rowNode]="rowNode" />
        {{ rowData.name }}
      </td>
      <td>{{ rowData.size }}</td>
      <td>{{ rowData.type }}</td>
    </tr>
  </ng-template>
</p-treeTable>

Design Tokens

root

TokenValue
transitionDuration{transition.duration}
Color-scheme override — root.borderColor
  • Light: {content.border.color}
  • Dark: {surface.800}

TokenValue
background{content.background}
borderColor{treetable.border.color}
color{content.color}
borderWidth0 0 1px 0
padding0.75rem 1rem

headerCell

TokenValue
background{content.background}
hoverBackground{content.hover.background}
selectedBackground{highlight.background}
borderColor{treetable.border.color}
color{content.color}
hoverColor{content.hover.color}
selectedColor{highlight.color}
gap0.5rem
padding0.75rem 1rem
focusRing.width{focus.ring.width}
focusRing.style{focus.ring.style}
focusRing.color{focus.ring.color}
focusRing.offset-1px
focusRing.shadow{focus.ring.shadow}

columnTitle

TokenValue
fontWeight600

row

TokenValue
background{content.background}
hoverBackground{content.hover.background}
selectedBackground{highlight.background}
color{content.color}
hoverColor{content.hover.color}
selectedColor{highlight.color}
focusRing.width{focus.ring.width}
focusRing.style{focus.ring.style}
focusRing.color{focus.ring.color}
focusRing.offset-1px
focusRing.shadow{focus.ring.shadow}

bodyCell

TokenValue
borderColor{treetable.border.color}
padding0.75rem 1rem
gap0.5rem
Color-scheme override — bodyCell.selectedBorderColor
  • Light: {primary.100}
  • Dark: {primary.900}

footerCell

TokenValue
background{content.background}
borderColor{treetable.border.color}
color{content.color}
padding0.75rem 1rem

columnFooter

TokenValue
fontWeight600

TokenValue
background{content.background}
borderColor{treetable.border.color}
color{content.color}
borderWidth0 0 1px 0
padding0.75rem 1rem

nodeToggleButton

The expand/collapse button rendered inline in each tree row.
TokenValue
hoverBackground{content.hover.background}
selectedHoverBackground{content.background}
color{text.muted.color}
hoverColor{text.color}
selectedHoverColor{primary.color}
size1.75rem
borderRadius50%
focusRing.width{focus.ring.width}
focusRing.style{focus.ring.style}
focusRing.color{focus.ring.color}
focusRing.offset{focus.ring.offset}
focusRing.shadow{focus.ring.shadow}

Additional Tokens

sortIcon

TokenValue
color{text.muted.color}
hoverColor{text.hover.muted.color}
size0.875rem

loadingIcon

TokenValue
size2rem

columnResizer

TokenValue
width0.5rem

resizeIndicator

TokenValue
width1px
color{primary.color}

paginatorTop / paginatorBottom

TokenValue
borderColor{content.border.color}
borderWidth0 0 1px 0

Theme Notes

Global transition: none Override

The Nettalco CSS layer (css/index.ts) removes CSS transitions from TreeTable body rows and header cells to prevent hover-flicker during rapid mouse movement:
.p-treetable .p-treetable-tbody > tr,
th.p-treetable-header-cell,
.p-treetable thead.p-treetable-thead > tr > th {
    transition: none;
}
This mirrors the same override applied to p-datatable. All interactive state changes (hover background, selection highlight) still apply instantly.

Overlay Loading Mask

.p-treetable-mask.p-overlay-mask {
    --px-mask-background: light-dark(rgba(255,255,255,0.5), rgba(0,0,0,0.3));
}
Unlike DataTable, TreeTable does not expose size variant (sm / lg) sub-tokens on its padding properties. Use custom CSS or override individual cell padding tokens if density adjustment is needed.

Build docs developers (and LLMs) love