01Density isn't the enemy

Consumer UI advice says give everything room to breathe. Enterprise users doing the same task hundreds of times a day want the opposite: more rows on screen, fewer scrolls, less mouse travel. A dense table isn't a design failure. A table that's dense and illegible is.

The goal isn't to add whitespace until it feels friendly. It's to add just enough visual structure — alignment, spacing rhythm, typographic hierarchy — that density doesn't turn into noise.

02What keeps a dense table usable

  1. 01

    Align numbers right, text left

    Right-aligned numeric columns let users compare magnitudes at a glance without reading every digit. Mixed alignment in the same column is the fastest way to make a table feel chaotic.

  2. 02

    One accent color, used sparingly

    Status badges and highlights lose their meaning fast if every column has its own color scheme. Reserve color for the one or two things that need to draw the eye.

  3. 03

    Sticky headers, sticky key columns

    In a table users scroll through for minutes at a time, losing the header, or the row's identifying column, after the first scroll breaks the whole interaction.

  4. 04

    Filters above the fold, always visible

    Power users filter before they scan. Hiding filters behind a toggle adds a click to the most common action in the workflow. Put them where the eye lands first.

  5. 05

    Design the empty and loading states

    A table with zero rows or a slow query is not an edge case in enterprise software — it happens constantly with real filters. Skeleton rows and a real empty-state message, not a blank white box.

  6. 06

    Let density be a user preference

    Comfortable vs. compact row height, as a saved per-user setting, resolves more density arguments than any single "correct" spacing choice ever will.

03Know which columns are load-bearing

Not every column deserves equal visual weight. In a healthcare scheduling table, patient name and time are load-bearing and need the strongest hierarchy. In a distribution inventory table, SKU and quantity on hand are. Everything else is supporting detail.

Talk to the people who use the table daily before deciding hierarchy. What they scan for first is rarely what's listed first in the source data, and getting this wrong is the single biggest reason a "complete" data table still feels hard to use.

04Dense tables with PrimeNG

PrimeNG's p-table covers most of this list out of the box: scrollHeight="flex" gives a sticky header inside a flex layout, pFrozenColumn pins the key column, and the size input switches row density.

I bind density to a user-preference signal stored in a settings service, so a user's choice carries across every table in the app instead of being reset per screen. Numeric columns get a shared right-aligned, tabular-figures class.

invoices-table.component.html
<p-table [value]="invoices()" [scrollable]="true" scrollHeight="flex"
         [size]="prefs.density()" [loading]="loading()">
  <ng-template #header>
    <tr>
      <th pFrozenColumn>Invoice</th>
      <th>Client</th>
      <th class="num">Amount</th>
    </tr>
  </ng-template>
  <ng-template #body let-inv>
    <tr>
      <td pFrozenColumn>{{ inv.number }}</td>
      <td>{{ inv.client }}</td>
      <td class="num">{{ inv.amount | currency: 'GBP' }}</td>
    </tr>
  </ng-template>
  <ng-template #emptymessage>
    <tr><td colspan="3"><app-empty-state kind="filtered" /></td></tr>
  </ng-template>
</p-table>

The takeaway

A dense enterprise table stays usable through structure, not spacing: consistent alignment, restrained color, sticky reference points, visible filters, and a real design for the empty and loading states. Get the hierarchy right by asking the people who scan it every day — not by guessing from the schema.

Written by Jaymin MahetaSenior UI/UX Developer turning Figma designs into fast, accessible enterprise apps in Angular and React.
About me →