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 DataTable is the most feature-rich data component in the Nettalco preset. It provides a fully styled tabular layout with support for sorting, filtering, pagination, row selection, row grouping, column resizing, and expandable rows — all driven by a structured set of design tokens and a global CSS override that eliminates hover-flicker on table rows.

Angular Usage Example

<p-table
  [value]="products"
  [paginator]="true"
  [rows]="10"
  selectionMode="single"
  [(selection)]="selected"
  styleClass="p-datatable-sm"
>
  <ng-template pTemplate="header">
    <tr>
      <th pSortableColumn="name">
        Name <p-sortIcon field="name" />
      </th>
      <th pSortableColumn="price">
        Price <p-sortIcon field="price" />
      </th>
      <th>Category</th>
      <th>Status</th>
    </tr>
  </ng-template>

  <ng-template pTemplate="body" let-product>
    <tr [pSelectableRow]="product">
      <td>{{ product.name }}</td>
      <td>{{ product.price | currency }}</td>
      <td>{{ product.category }}</td>
      <td>
        <p-tag [value]="product.status" />
      </td>
    </tr>
  </ng-template>

  <ng-template pTemplate="footer">
    <tr>
      <td colspan="4">Total: {{ products.length }} products</td>
    </tr>
  </ng-template>
</p-table>

Size Variants

Apply a styleClass to the <p-table> element to switch between density presets. All padding tokens (header, headerCell, bodyCell, footerCell, footer) carry corresponding sm and lg sub-tokens.
ClassPadding (cell)
p-datatable-sm0.375rem 0.5rem
(default)0.75rem 1rem
p-datatable-lg1rem 1.25rem

Design Tokens

root

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

The toolbar-style panel rendered above the table grid.
TokenValue
background{content.background}
borderColor{datatable.border.color}
color{content.color}
borderWidth0 0 1px 0
padding0.75rem 1rem
sm.padding0.375rem 0.5rem
lg.padding1rem 1.25rem

headerCell

Individual <th> cells in the table head.
TokenValue
background{content.background}
hoverBackground{content.hover.background}
selectedBackground{highlight.background}
borderColor{datatable.border.color}
color{content.color}
hoverColor{content.hover.color}
selectedColor{highlight.color}
gap0.5rem
padding0.75rem 1rem
sm.padding0.375rem 0.5rem
lg.padding1rem 1.25rem
focusRing.width{focus.ring.width}
focusRing.style{focus.ring.style}
focusRing.color{focus.ring.color}
focusRing.offset-1px
focusRing.shadow{focus.ring.shadow}

columnTitle

Typography weight applied to the visible column header text span.
TokenValue
fontWeight600

row

Tokens applied to every <tr> inside <tbody>.
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}
Color-scheme override — row.stripedBackground
  • Light: {surface.50}
  • Dark: {surface.950}

bodyCell

Individual <td> cells in the table body.
TokenValue
borderColor{datatable.border.color}
padding0.75rem 1rem
sm.padding0.375rem 0.5rem
lg.padding1rem 1.25rem
Color-scheme override — bodyCell.selectedBorderColor
  • Light: {primary.100}
  • Dark: {primary.900}

The panel rendered below the table grid (not the column footer row).
TokenValue
background{content.background}
borderColor{datatable.border.color}
color{content.color}
borderWidth0 0 1px 0
padding0.75rem 1rem
sm.padding0.375rem 0.5rem
lg.padding1rem 1.25rem

footerCell

Individual cells inside the <tfoot> column footer row.
TokenValue
background{content.background}
borderColor{datatable.border.color}
color{content.color}
padding0.75rem 1rem
sm.padding0.375rem 0.5rem
lg.padding1rem 1.25rem

columnFooter

TokenValue
fontWeight600

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}

dropPoint

TokenValue
color{primary.color}

rowToggleButton

TokenValue
hoverBackground{content.hover.background}
selectedHoverBackground{content.background}
color{text.muted.color}
hoverColor{text.color}
selectedHoverColor{primary.color}
size1.75rem
borderRadius50%

paginatorTop / paginatorBottom

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

Theme Notes

Global transition: none Override

The Nettalco CSS layer (defined in css/index.ts) applies the following rule globally:
.p-datatable .p-datatable-tbody > tr,
thead.p-datatable-thead > tr > th,
th.p-datatable-header-cell {
    transition: none;
}
This override removes the default PrimeNG transition on table rows and header cells to prevent the visible hover-flicker that occurs when the browser repaints many table rows simultaneously during rapid mouse movement. Interactive states (hover, selected) still update immediately because color changes do not require a CSS transition to render correctly.

Overlay Loading Mask

The built-in css block in the DataTable token file sets a semi-transparent loading mask that respects the active color scheme:
.p-datatable-mask.p-overlay-mask {
    --px-mask-background: light-dark(rgba(255,255,255,0.5), rgba(0,0,0,0.3));
}

Build docs developers (and LLMs) love