Component Porchlight CSS

Data-dense mode

A fourth density tier for SIEM dashboards, trading terminals, and analytics consoles where screen real estate is at a premium.

52 components 51 stable 1 experimental

Status
stable
Since
0.3.0

Command

Search Porchlight

Data-dense mode

The data-density="dense" tier is the fourth and tightest density level, below compact. While compact only shrinks control geometry (button height, padding), dense also compresses the spacing scale, table row height, and small text sizes — maximizing information density for data-heavy screens.

When to use

TierControl heightBest for
touch2.75rem (44px)Mobile, tablets, kiosks
comfortable2.5rem (40px)Default — most SaaS apps
compact2rem (32px)Admin panels, settings, internal tools
dense1.75rem (28px)SIEM, analytics, log viewers, trading terminals

Usage

Set data-density="dense" on a container — it cascades to all children:

<div data-density="dense">
  <!-- Everything inside is compressed: tighter controls, smaller gaps,
       denser tables, smaller text in data areas. -->
</div>

You can also set it on <body> if the entire app is data-dense.

What changes

Token groupcomfortabledenseReduction
--pl-control-block-size2.5rem1.75rem30%
--pl-control-padding-inline1rem0.5rem50%
--pl-space-41rem0.75rem25%
--pl-space-61.5rem1rem33%
--pl-text-sm0.875rem0.8125rem7%
--pl-text-xs0.75rem0.6875rem8%

Control height, spacing, and text all compress together so the visual rhythm stays consistent at the tighter scale.

Dense-specific patterns

The data-dense preview demonstrates:

  • KPI strip — 8 metrics in one row, compact tiles with value + delta
  • Tight event tabledata-density="dense" on .c-table-wrap for minimal row padding
  • Compact sidebar — 12rem width, mini badges for alert counts
  • Slim toolbar — filter buttons, split button, inline count text
  • Mono text--pl-font-mono for IPs, hostnames, timestamps
  • Truncated messages.u-truncate on long event descriptions

Mixing tiers

You can nest density tiers — a dense page with a comfortable modal:

<body data-density="dense">
  <!-- Everything is dense -->
  <dialog data-density="comfortable">
    <!-- But this modal is comfortable -->
  </dialog>
</body>

This is useful when a dense dashboard opens a form or detail panel that needs more breathing room.