Compare Split
Native controls work. Demo links and submissions stay inside this specimen. This example scrolls horizontally at this width.
Source markup
<!-- @dsCard group="Display" height=340 -->
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<title>CompareSplit</title>
<style>
/* Layout of the demo state only. No component values are set here. */
.demo { display: flex; flex-direction: column; gap: var(--space-3xs); max-width: 960px; }
/* .nz-split carries margin-top: var(--space-xl) for section flow.
Zeroed here so the card keeps its marker height. */
.demo .nz-split { margin-top: 0; }
</style>
</head>
<body>
<div class="demo">
<p class="t-label">Rest · two columns, one column below 768px</p>
<section class="nz-split" aria-label="Renting proprietary software against owning the stack">
<div class="nz-col nz-col--bad">
<p class="nz-col__tag"><span class="sr-only">Drawbacks: </span>The rent trap</p>
<div class="nz-col__list">
<ul>
<li><b>Licences renew.</b> Access is never owned.</li>
<li><b>The exit is priced.</b> Data leaves in their format.</li>
<li><b>One supplier holds the keys.</b> And the roadmap.</li>
</ul>
</div>
</div>
<div class="nz-col nz-col--good">
<p class="nz-col__tag"><span class="sr-only">Strengths: </span>Owning it</p>
<div class="nz-col__list">
<ul>
<li><b>GNU/Linux and FOSS underneath.</b> Nothing to escape later.</li>
<li><b>Open formats.</b> Export on request, any day.</li>
<li><b>The client holds the keys.</b> Noiz stays replaceable.</li>
</ul>
</div>
</div>
</section>
</div>
</body>
</html>
A two-column split that sets a bad option against a better one, three short items a side, to make a choice legible.
Use it where the argument is a comparison and both sides are short. Use it once per page. A feature matrix with more than a few rows belongs to Table, and pricing belongs to PricingRow. Do not add a third column: the grid is 1fr 1fr and the point is the pair.
The consumer provides the wrapper and both columns: .nz-split holding .nz-col.nz-col--bad and .nz-col.nz-col--good, each with a .nz-col__tag heading that opens with an .sr-only span (Drawbacks:, Strengths:) and a .nz-col__list wrapper around one <ul>. The Hugo shortcode renders a markdown list that way; only .nz-col__list ul resets the padding. Wrap the lead phrase of an item in <b>, which lifts it to color-semantic-text-secondary at font-weight-semibold; the rest stays color-semantic-text-muted. No pillar scope class applies: this component does not read --division-accent.
There is one state. .nz-split is a hairline color-semantic-border-base border at radius-md with overflow: hidden, and the column rule is the same hairline. .nz-col--bad sits on color-ground-tint-bad with a color-semantic-status-error tag and a cross glyph; .nz-col--good sits on color-ground-tint-good with a color-semantic-status-success tag and a tick. Padding is space-lg, the tag clears space-md, items are space-sm apart and indent by space-md. Below 768px the grid becomes one column and the divider moves to the top edge. .nz-split carries a space-xl lead-in, zeroed in this preview.
Do not swap the translucent tints for solid fills, and do not tint the good column amber: amber is the accent, not a verdict. Do not add shadow-phosphor here.
Accessibility
Section titled “Accessibility”- Role: the native
<section>on.nz-split, a<p>tag heading and one<ul>a side. No ARIA role is needed. - Accessible name: the
aria-labelon.nz-split, which names the comparison. Each column is named by its.nz-col__tag, whose.sr-onlyspan carries the verdict; keep that prefix, since the glyphs are CSScontentand the tints are colour. - Keyboard: not interactive. Nothing is focusable, so Tab passes over it; Enter, Space, Escape and the arrows do nothing.
- Target size: WCAG 2.2 SC 2.5.8 does not apply, since no part is interactive;
bundle.cssgives these classes no hit area and no focus ring. - Announcement: none; the content is static, so no live region.
Hand-written from themes/noiz/assets/css/components.css (.nz-split, .nz-col, .nz-col–bad, .nz-col–good, .nz-col__tag, .nz-col__list).