Job Alerts DS

Buttons

Variant = importance, one primary per view, destructive rules, selection controls.

Show audit of the app before this rule

Audit — what we have today

✓ Already right

  • Zero raw <button> elements — everything routes through Mantine.
  • All 7 visible ActionIcons carry aria-labels; stepper buttons too.
  • SegmentedControl already used (2×) for same-content view switching.
  • No radius overrides anywhere.

✗ Violations

  1. No variant tier system: 34 Buttons spread across 6 treatments — filled (11), default (2), outline (4), subtle (5), white (1), color="dark" (2) — with no rule mapping treatment to importance.
  2. Multiple primaries per view: workday section has 5 buttons; submit sits in the same card as 4 stepper buttons; funnel section has 3 filled.
  3. Delete without confirmation: recent-workdays Delete (subtle red) fires the DELETE request on first click — no dialog, no undo.
  4. Ad-hoc sizes: lg (4), sm (2), xs (3), unset (25) — no rule for when which.

Axis 1 — Variant tiers (importance)

Same workday card under each tier system. Primary (filled green) is identical in both — the difference is the secondary/tertiary treatments.

Option A — 3 tiers, quiet secondary

✓ CHOSEN

filled = primary (1 per view) · default (gray border) = secondary · subtle = tertiary/inline. Kill outline, white, color="dark".

Today's workday

14 clicked
5 qualified

+ Matches current majority (default already used for steppers); neutral secondary keeps green scarce → primary pops.
− Secondary is visually quiet; on dense cards it can read as disabled.

Option B — 3 tiers, branded secondary

filled = primary · outline (green border) = secondary · subtle = tertiary. Kill default, white, color="dark".

Today's workday

14 clicked
5 qualified

+ Stronger brand presence; secondary clearly interactive.
− Green everywhere dilutes the one-green rule from Section 1; steppers become louder than their job.

Axis 2 — Destructive actions

Real case: deleting a logged workday (currently one click, no confirm). Try both delete buttons.

Option 1 — Confirm dialog

✓ CHOSEN

Row action stays subtle red; click opens a dialog that restates what's deleted. Dialog's confirm = filled red with explicit verb ("Delete workday").

Mon, Jul 6 — 14 clicked · 5 qualified · 3 applied

Click Delete — dialog restates the target before anything happens.

+ Standard (Carbon/Polaris); friction proportional to irreversibility; no undo infrastructure needed.
− One extra click on every delete.

Option 2 — Immediate + undo toast

Delete fires instantly; a toast offers Undo for ~8s. Requires soft-delete or restore endpoint per deletable entity.

Mon, Jul 6 — 14 clicked · 5 qualified · 3 applied

Row disappears instantly; toast with Undo appears bottom-right (mock).

+ Zero friction for frequent deleters.
− Needs restore plumbing per entity (API + state); riskier while entities are few and deletes are rare.

Axis 3 — Buttons on inverted / brand panels

Real case: the three brand-green CTA bands (home, privacy, terms). Section 2 permits variant="white" as the inverted-panel exception but bans color="dark" outright — and all three bands ship the two together. The rule contradicts the code, so one of them has to move.

Audit — what we have today

  • 3× size="lg" variant="white" color="dark" — app/page.tsx, app/privacy/page.tsx, app/terms/page.tsx. Identical treatment in all three.
  • 0× white buttons on a normal (non-inverted) surface — the exception has never leaked.
  • AppButton has no tier for this case, so all three call sites hand-wire raw Mantine props and bypass the primitive entirely.
  • The band is brand green, not neutral dark, and it inverts again in dark mode (--color-brand-strong goes from #16a34a to #22c55e) — so the label colour has to hold in both schemes.

Option A — Keep the pairing, widen the exception

Status quo, written down: variant="white" + color="dark" is the inverted-panel primary. The ban on color="dark" keeps applying everywhere else.

Ready to start

Sign up and start using the workspace.

Label on button face

13.6:1

Holds in dark mode

16.5:1

+ Zero code change; the rendered result is already approved.
− Call sites keep hand-wiring two raw Mantine props, so the primitive still can't enforce the pairing and a guard rule has to special-case it.

Option B — Give AppButton an inverse tier

✓ CHOSEN

<AppButton tier="inverse"> resolves to variant="white" color="dark" internally. Renders identically; call sites stop naming Mantine variants.

Ready to start

Sign up and start using the workspace.

Label on button face

13.6:1

Holds in dark mode

16.5:1

+ Matches how every other tier works — the primitive owns the decision, not the page. The ban on color="dark" can then stay absolute in app code.
− One more tier to learn; needs the three call sites migrated.

Option C — No white button; dark neutral instead

Carbon's position: don't invert the button, keep a punchy filled CTA with a white label. Here that means a dark neutral button on the green band.

Ready to start

Sign up and start using the workspace.

White label on dark face

13.6:1

Button face vs band

4.1-6.0:1

+ Best face-against-band separation, and it keeps a single "buttons are filled shapes with light labels" mental model.
− Introduces a second neutral-dark action colour into a system that has exactly one brand colour, and it reads heavier than the band it sits on.

Evidence — what dropping color="dark" actually does

Mantine's white variant paints the label --mantine-color-{color}-filled. With no colour it falls back to the primary, so the label turns brand green on a white face — this is the drift the audit would have introduced if the ban had been applied literally.

Ready to start

Sign up and start using the workspace.

Green label on white face (light)

2.4:1

Green label on white face (dark mode)

3.5:1

Both fail the 4.5:1 floor for normal text (WCAG 1.4.3). Whatever option wins, the label colour has to be stated explicitly — it cannot be left to the theme default.

Shared rules (all options)

  • One primary (filled) per view.A sub-form's primary demotes the parent's to secondary while open.
  • Color = importance/meaning, shape = context — never both on one axis. Filled green stays brand-action-only (Section 1 rule).
  • Sizes: default (sm) in app UI · xs inside table rows / steppers · lg marketing heroes only. Nothing else.
  • Icon-only buttons: always ActionIcon with aria-label; min 24px target (WCAG 2.5.8 AA), 44px where touch matters.
  • Selection controls stay dedicated primitives: binary → Switch/Checkbox; 2–5 same-content views → SegmentedControl; different content → Tabs; never rows of look-alike Buttons.
  • Destructive = red + explicit verb ("Delete workday", never bare "Delete" in dialogs) regardless of Axis 2 outcome.
Show research sources
✓

Decision: Option A + Option 1

Why Option A (quiet secondary):

  1. Steppers already used default — codifies the majority pattern.
  2. Keeps green scarce so the single filled primary pops — consistent with Section 1's one-green rule. Option B's green outlines dilute it on dense cards.

Why Option 1 (confirm dialog):

  1. Carbon/Polaris standard; friction proportional to irreversibility.
  2. Option 2 needs restore plumbing per deletable entity — unjustified while deletes are rare.

Amendment found during adoption:

variant="white" is NOT killed — both uses sit on inverted (dark) marketing panels where it is the correct on-dark primary. Rule: white = primary on inverted panels only, never on normal surfaces.

Axis 3 — Option B (2026-09-08):

  1. Every other tier already works this way: the page names the job, the primitive picks the props. Hand-wiring variant + color on three marketing pages was the only place that rule broke.
  2. The rendered button does not change, so there is no visual risk — this is the same treatment with a name.
  3. With the pairing inside AppButton, the ban on color="dark" can stay absolute in app code and the guard can enforce it without a marketing special case. Option A would have needed that special case forever.
  4. Option C lost because a second neutral-dark action colour contradicts Section 1's one-green system, and it changes three shipping pages for no accessibility gain — the white pairing already measures 13.6:1.

Applied at adoption:

  • 5× outline → default (secondary tier).
  • 1× subtle color="dark" → plain subtle.
  • Workday delete now opens a confirm dialog restating the target.
  • Funnel status filter (4 look-alike filled/light Buttons) → SegmentedControl with counts, per the selection-control rule.
  • AppButton gained tier="inverse"; the 3 CTA bands (home, privacy, terms) migrated off raw variant/color props.
  • design-guard rule inverted-panel-raw-props now fails any variant="white" or color="dark" outside components/ui/, marketing files included.

Design system for a freelance job-alert app. App copies are downstream.