Skip to content

Data display

Data display classes make dense information readable: tabular numerals, mono labels, rows with slots, and inline annotations.

A table is dense data rows with hairline rules, mono column labels and tabular numerals. The nw-table-wrap div supplies the border, the radius and the scroll area; the table itself is unboxed, so it also works bare.

Six relays on the night grid
Node Status
hel-01 Helsinki 12 ms Online
ams-03 Amsterdam 9 ms Online
fra-02 Frankfurt 31 ms Degraded
sto-04 Stockholm — Offline
Average17 ms
Small, striped and bordered, no wrapper
NodeLoad
hel-0141%
ams-0367%
fra-0295%
A row wash: fra-02 is over capacity
<div class="nw-table-wrap">
<table class="nw-table nw-table-hover nw-table-sticky">
<caption>Six relays on the night grid</caption>
<thead>
<tr>
<th scope="col">Node</th>
<th scope="col" aria-sort="ascending"><button type="button" class="nw-table-sort">Region</button></th>
<th scope="col" aria-sort="none"><button type="button" class="nw-table-sort">Latency</button></th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">hel-01</th>
<td>Helsinki</td>
<td class="nw-table-num">12 ms</td>
<td class="nw-table-ink nw-table-success">Online</td>
</tr>
<tr aria-selected="true">
<th scope="row">ams-03</th>
<td>Amsterdam</td>
<td class="nw-table-num">9 ms</td>
<td class="nw-table-ink nw-table-success">Online</td>
</tr>
<tr>
<th scope="row">fra-02</th>
<td>Frankfurt</td>
<td class="nw-table-num">31 ms</td>
<td class="nw-table-ink nw-table-warning">Degraded</td>
</tr>
<tr data-disabled>
<th scope="row">sto-04</th>
<td>Stockholm</td>
<td class="nw-table-num">&mdash;</td>
<td>Offline</td>
</tr>
</tbody>
<tfoot>
<tr><th scope="row">Average</th><td></td><td class="nw-table-num">17 ms</td><td></td></tr>
</tfoot>
</table>
</div>
<table class="nw-table nw-table-sm nw-table-striped nw-table-bordered">
<caption>Small, striped and bordered, no wrapper</caption>
<thead><tr><th>Node</th><th class="nw-table-num">Load</th></tr></thead>
<tbody>
<tr><td>hel-01</td><td class="nw-table-num">41%</td></tr>
<tr><td>ams-03</td><td class="nw-table-num">67%</td></tr>
<tr><td>fra-02</td><td class="nw-table-num">95%</td></tr>
<tr class="nw-table-danger"><td colspan="2">A row wash: fra-02 is over capacity</td></tr>
</tbody>
</table>
Class / selector Effect
nw-table The table: mono uppercase labels, tabular numerals, hairlines between rows.
nw-table-wrap Scroll wrapper with the border and radius; put the table inside for wide data.
nw-table-sm, -md, -lg Cell padding and type.
nw-table-striped Every second row washed.
nw-table-hover Row hover; a selected row keeps its intent wash while hovered.
nw-table-bordered Hairlines between columns too.
nw-table-sticky The header stays put while the body scrolls (inside the wrapper).
nw-table-num A numeric column: tabular figures, aligned to the end.
nw-table-center A centered column.
nw-table-empty An empty-state cell: generous padding, centered, subtle ink.
nw-table-caption-top Moves the caption above the table.
nw-table-sort A sort button inside a th; the arrow comes from the th’s aria-sort.
th[aria-sort] Draws the direction arrow; aria-sort="none" draws nothing.
tr[aria-selected="true"], tr[data-selected] The selected row: a soft intent wash.
tr[data-disabled] Muted row.
tr:focus-visible A row can be a target (with tabindex); focus draws a ring.
nw-table-primary … -danger on a tr, th or td A soft intent wash on the row or cell.
nw-table-ink Pair it with an intent class: the cell’s text carries the intent ink too.

A bare <td> wash without .nw-table-ink colors only the background; add the ink class when the text itself must carry the color.

A list is rows of content: <ul class="nw-list"> of .nw-list-item rows, or <li><a class="nw-list-item"> for navigable rows. A bare <li> is a plain wrapper; an <li> that is itself the item keeps the row layout.

  • First relay
  • Second relay
  1. Connect
  2. Check route
  3. Go live
  • Firmware flashed
  • Keys rotated
  • eu-north
  • eu-west
  • us-east
<ul class="nw-list nw-list-divided">
<li class="nw-list-item">
<span class="nw-list-item-icon" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="12" cy="12" r="9"/><path d="M12 8v4l3 2"/></svg></span>
<span class="nw-list-item-content">
<span class="nw-list-item-title">hel-01</span>
<span class="nw-list-item-description">Helsinki edge, 12 ms from the core.</span>
</span>
<span class="nw-list-item-meta">eu-north</span>
<span class="nw-list-item-end"><span class="nw-badge nw-badge-sm nw-badge-soft nw-badge-success">Online</span></span>
</li>
<li><a class="nw-list-item" href="#nw-list">
<span class="nw-list-item-media"><span class="nw-skeleton nw-skeleton-circle" style="--_size: 2.5rem"></span></span>
<span class="nw-list-item-content">
<span class="nw-list-item-title">ams-03 (interactive row)</span>
<span class="nw-list-item-description">Hover raises it; focus draws the ring.</span>
</span>
<span class="nw-list-item-end"><kbd class="nw-kbd nw-kbd-sm">&rarr;</kbd></span>
</a></li>
<li class="nw-list-item" aria-selected="true">
<span class="nw-list-item-content">
<span class="nw-list-item-title">fra-02 (selected)</span>
<span class="nw-list-item-description">The selected row carries the intent ink.</span>
</span>
</li>
</ul>
<ul class="nw-list nw-list-bullet">
<li>First relay</li>
<li>Second relay</li>
</ul>
<ol class="nw-list nw-list-ordered">
<li>Connect</li>
<li>Check route</li>
<li>Go live</li>
</ol>
<ul class="nw-list nw-list-check">
<li>Firmware flashed</li>
<li>Keys rotated</li>
</ul>
<ul class="nw-list nw-list-inline nw-list-sm">
<li>eu-north</li><li>eu-west</li><li>us-east</li>
</ul>
Class / selector Effect
nw-list A column of rows.
nw-list-item A row: icon, media, content, meta and end slots.
nw-list-item-icon, -media Leading slots; mark icons aria-hidden.
nw-list-item-content, -title, -description The text column and its lines.
nw-list-item-meta, -end Trailing slots; the end slot aligns after the meta.
nw-list-divided A hairline between rows.
nw-list-bordered A panel with hairlines inside.
nw-list-interactive Rows are pointer surfaces: hover, active and focus states. Also automatic on <a>/<button> rows.
nw-list-bullet, nw-list-ordered Markers in the intent ink.
nw-list-check A check glyph as the marker.
nw-list-inline Items flow in a row.
nw-list-xs … -lg Row sizes.
nw-list-primary … -danger The marker ink, and the selected row’s ink.
[aria-current], [aria-selected="true"], nw-list-item-active The selected row.
[aria-disabled="true"], :disabled Muted row.

A description list pairs terms with details: terms in the mono eyebrow face beside their details.

Node
hel-01
Region
Helsinki, eu-north
Latency
12 ms
Status
Online since 04:12
Node
hel-01
Region
Helsinki, eu-north
<dl class="nw-dl">
<div><dt>Node</dt><dd>hel-01</dd></div>
<div><dt>Region</dt><dd>Helsinki, eu-north</dd></div>
<div><dt>Latency</dt><dd>12 ms</dd></div>
<div><dt>Status</dt><dd>Online since 04:12</dd></div>
</dl>
<dl class="nw-dl nw-dl-stacked">
<dt>Node</dt><dd>hel-01</dd>
<dt>Region</dt><dd>Helsinki, eu-north</dd>
</dl>
Class Effect
nw-dl Terms in a fixed inline column, details flowing; wraps under 40rem.
nw-dl-stacked Each pair on its own lines.
nw-dl-divided A hairline between pairs.

nw-kbd is a keycap; a chord is a .nw-kbd-combo of keycaps, with the plus generated between them. The 2px lower edge gives the cap its depth and flattens when pressed. A hotkey hint pairs a chord with its label.

Press K to open the command palette, or CtrlK anywhere. A pressed key: Shift. A disabled one: Caps.

xs sm md lg Solid Outline Glow
CtrlKCommand palette ?Shortcuts EscClose
<p>
Press <kbd class="nw-kbd">K</kbd> to open the command palette, or
<span class="nw-kbd-combo"><kbd class="nw-kbd">Ctrl</kbd><kbd class="nw-kbd">K</kbd></span> anywhere.
A pressed key: <kbd class="nw-kbd nw-kbd-pressed">Shift</kbd>. A disabled one:
<kbd class="nw-kbd nw-kbd-disabled">Caps</kbd>.
</p>
<div class="nw-cluster">
<kbd class="nw-kbd nw-kbd-xs">xs</kbd>
<kbd class="nw-kbd nw-kbd-sm">sm</kbd>
<kbd class="nw-kbd">md</kbd>
<kbd class="nw-kbd nw-kbd-lg">lg</kbd>
<kbd class="nw-kbd nw-kbd-solid nw-kbd-secondary">Solid</kbd>
<kbd class="nw-kbd nw-kbd-outline">Outline</kbd>
<kbd class="nw-kbd nw-kbd-glow">Glow</kbd>
</div>
<div class="nw-hotkeys">
<span class="nw-hotkey"><span class="nw-kbd-combo"><kbd class="nw-kbd">Ctrl</kbd><kbd class="nw-kbd">K</kbd></span><span class="nw-hotkey-label">Command palette</span></span>
<span class="nw-hotkey"><kbd class="nw-kbd">?</kbd><span class="nw-hotkey-label">Shortcuts</span></span>
<span class="nw-hotkey"><kbd class="nw-kbd">Esc</kbd><span class="nw-hotkey-label">Close</span></span>
</div>
Class / selector Effect
nw-kbd The keycap.
nw-kbd-xs, -sm, -md, -lg Cap sizes.
nw-kbd-solid, -outline, -glow Filled cap, cap without a fill, and a lit cap that brightens when pressed.
nw-kbd-pressed, [aria-pressed="true"], :active The cap travels one pixel and loses its lower edge.
nw-kbd-disabled, [aria-disabled="true"] A flat, muted cap.
nw-kbd-primary … -danger The cap takes the intent ink on its tint, with a tinted edge.
nw-kbd-combo A chord; the plus is generated between caps.
nw-kbd-combo-plain A chord without the generated plus.
nw-hotkey A chord with a trailing label.
nw-hotkey-label The label.
nw-hotkeys, nw-hotkeys-vertical A wrapping row of hints, or a column of them.

nw-code marks inline code on a sunken well; it follows the size of its text unless pinned with a size class.

Inline code: set --nw-cut on any element. Wrapped: a-very-long-kebab-case-token-name-that-wraps. Plain, no well: data-flavor. Pinned sizes: xs, lg.

Intent inks: 200 OK, 418, deprecated.

<p>
Inline code: set <code class="nw-code">--nw-cut</code> on any element. Wrapped:
<code class="nw-code nw-code-wrap">a-very-long-kebab-case-token-name-that-wraps</code>. Plain, no well:
<code class="nw-code nw-code-plain">data-flavor</code>. Pinned sizes:
<code class="nw-code nw-code-xs">xs</code>, <code class="nw-code nw-code-lg">lg</code>.
</p>
<p>
Intent inks: <code class="nw-code nw-code-success">200 OK</code>,
<code class="nw-code nw-code-danger">418</code>, <code class="nw-code nw-code-warning">deprecated</code>.
</p>

nw-pre is the block: an optional header (filename, language, actions), line numbers, highlighted, added and removed lines, a terminal mode, and the cut-corner console.

relay.ts ts
export const relay = { id: 'hel-01', region: 'eu-north', zone: 'eu', }
export const up = () => 1
export const down = () => -1
export const focus = () => 0
nyxwire deploy --relay hel-01 Relay hel-01 is live in 1.4 s.
.nw-pre-cut { clip-path: var(--nw-cut-path) }
<figure class="nw-pre">
<figcaption class="nw-pre-header">
<span class="nw-pre-filename">relay.ts</span>
<span class="nw-pre-lang">ts</span>
<span class="nw-pre-actions"><button type="button" class="nw-btn nw-btn-xs nw-btn-ghost">Copy</button></span>
</figcaption>
<code class="nw-pre-body">
<span class="nw-line nw-line-highlight">export const relay = {</span>
<span class="nw-line"> id: 'hel-01',</span>
<span class="nw-line nw-line-add"> region: 'eu-north',</span>
<span class="nw-line nw-line-del"> zone: 'eu',</span>
<span class="nw-line">}</span>
</code>
</figure>
<pre class="nw-pre nw-pre-lines"><code><span class="nw-line">export const up = () =&gt; 1</span>
<span class="nw-line">export const down = () =&gt; -1</span>
<span class="nw-line nw-line-focus">export const focus = () =&gt; 0</span></code></pre>
<div class="nw-pre nw-pre-terminal">
<code class="nw-pre-body"><span class="nw-prompt"></span>nyxwire deploy --relay hel-01
<span class="nw-output">Relay hel-01 is live in 1.4 s.</span></code>
</div>
<div class="nw-pre nw-pre-cut nw-pre-wire nw-pre-sm">
<code class="nw-pre-body">.nw-pre-cut { clip-path: var(--nw-cut-path) }</code>
</div>
Class Effect
nw-pre The block: sunken fill, hairline, radius lg. The scrolling box is the inner <code>.
nw-pre-header The header row; it stays put while the body scrolls.
nw-pre-filename, nw-pre-lang, nw-pre-actions The file name, the language tag and the action slot.
nw-pre-body The scrolling body, for markup whose code element is not the direct child.
nw-pre-caption A caption row under the block, ruled off.
nw-pre-lines Line numbers, counted in CSS so the source stays clean.
nw-line One source line, spanning the block’s full width so a wash reaches the edges.
nw-line-highlight A tonal wash on the line.
nw-line-add, nw-line-del Added and removed lines, with their sign in the gutter.
nw-line-focus A focused line; the others dim until the block is hovered.
nw-pre-terminal Terminal mode: a prompt glyph before each command line; .nw-output lines carry none.
nw-pre-cut The chamfered console, with the wire as its edge when combined with nw-pre-wire.
nw-pre-wire The gradient edge around the block.
nw-pre-xs … -lg Block sizes.
nw-pre-wrap Wraps lines instead of scrolling.

An avatar is a rounded slot for a user: an image, initials in the fallback, or an empty bordered slot. The fallback shows until the image has a source.

RK KV MX SB AL NW JO JO JO JO
XS SM MD LG XL 2X
RK KV MX +6 GO
<div class="nw-cluster">
<span class="nw-avatar"><img class="nw-avatar-img" src="" alt="" /><span class="nw-avatar-fallback">RK</span></span>
<span class="nw-avatar nw-avatar-square"><span class="nw-avatar-fallback">KV</span></span>
<span class="nw-avatar nw-avatar-cut"><span class="nw-avatar-fallback">MX</span></span>
<span class="nw-avatar nw-avatar-solid nw-avatar-secondary"><span class="nw-avatar-fallback">SB</span></span>
<span class="nw-avatar nw-avatar-outline"></span>
<span class="nw-avatar nw-avatar-ring"><span class="nw-avatar-fallback">AL</span></span>
<span class="nw-avatar nw-avatar-glow"><span class="nw-avatar-fallback">NW</span></span>
<span class="nw-avatar"><span class="nw-avatar-fallback">JO</span><span class="nw-avatar-status nw-avatar-status-online"></span></span>
<span class="nw-avatar"><span class="nw-avatar-fallback">JO</span><span class="nw-avatar-status nw-avatar-status-away"></span></span>
<span class="nw-avatar"><span class="nw-avatar-fallback">JO</span><span class="nw-avatar-status nw-avatar-status-busy"></span></span>
<span class="nw-avatar"><span class="nw-avatar-fallback">JO</span><span class="nw-avatar-status nw-avatar-status-offline"></span></span>
</div>
<div class="nw-cluster">
<span class="nw-avatar nw-avatar-xs"><span class="nw-avatar-fallback">XS</span></span>
<span class="nw-avatar nw-avatar-sm"><span class="nw-avatar-fallback">SM</span></span>
<span class="nw-avatar"><span class="nw-avatar-fallback">MD</span></span>
<span class="nw-avatar nw-avatar-lg"><span class="nw-avatar-fallback">LG</span></span>
<span class="nw-avatar nw-avatar-xl"><span class="nw-avatar-fallback">XL</span></span>
<span class="nw-avatar nw-avatar-2xl"><span class="nw-avatar-fallback">2X</span></span>
</div>
<div class="nw-cluster">
<span class="nw-avatar-group">
<span class="nw-avatar"><span class="nw-avatar-fallback">RK</span></span>
<span class="nw-avatar"><span class="nw-avatar-fallback">KV</span></span>
<span class="nw-avatar"><span class="nw-avatar-fallback">MX</span></span>
<span class="nw-avatar-group-count">+6</span>
</span>
<a class="nw-avatar nw-avatar-ring" href="#nw-avatar"><span class="nw-avatar-fallback">GO</span></a>
</div>
Class / selector Effect
nw-avatar The slot. Round by default; img.nw-avatar-img covers it.
nw-avatar-img The image; the fallback shows until it has a source.
nw-avatar-fallback The initials.
nw-avatar-square, nw-avatar-cut Square corners, or chamfered ones (the chamfer clips the image and fallback).
nw-avatar-solid The initials sit on the full intent.
nw-avatar-outline A bordered empty slot, for an “add” affordance.
nw-avatar-ring, nw-avatar-glow A gap and a ring in the intent color; and a bloom (a drop-shadow when cut).
nw-avatar-primary … -danger The fallback and ring intent.
nw-avatar-xs, -sm, -md, -lg, -xl, -2xl Sizes.
nw-avatar-status, -online, -away, -busy, -offline A status dot pinned to the lower trailing edge with a canvas gap.
nw-avatar-group, nw-avatar-group-count Overlapping group; each member is cut out of the next by a canvas ring, the hovered one rises. A trailing count uses the same box.
a.nw-avatar, button.nw-avatar An interactive avatar: hover, focus ring.

Give an initials avatar a textual name nearby, or an aria-label on the link when the avatar itself is the control: initials are decorative to a screen reader.

A hairline between regions, on <hr> or div role="separator". Text inside it sits in the line, set in the mono eyebrow face; a divider with no content runs one line the whole way.




fade
wire
wire + glow
success

A vertical one between inline items: Latency12 ms

<div class="nw-stack nw-stack-sm">
<hr class="nw-divider" />
<hr class="nw-divider nw-divider-strong" />
<hr class="nw-divider nw-divider-dashed" />
<div class="nw-divider nw-divider-fade">fade</div>
<div class="nw-divider nw-divider-wire">wire</div>
<div class="nw-divider nw-divider-wire nw-divider-glow">wire + glow</div>
<div class="nw-divider nw-divider-success">success</div>
<p>A vertical one between inline items: <span class="nw-cluster nw-cluster-sm"><span>Latency</span><span class="nw-divider nw-divider-vertical"></span><span>12 ms</span></span></p>
</div>
Class Effect
nw-divider The hairline.
nw-divider-start, -end The line runs only from the text’s far side.
nw-divider-dashed A dashed line.
nw-divider-strong, -bright A heavier line; the --nw-line-bright line.
nw-divider-fade The line fades out toward both ends.
nw-divider-wire The signature gradient, primary to secondary across the whole rule.
nw-divider-glow The line blooms.
nw-divider-primary … -danger The line’s and the text’s intent.
nw-divider-vertical A vertical rule that stretches to its row’s height.
nw-divider-xs, -sm, -md, -lg The space the divider takes around itself.