Skip to content

Nimi UI Material

Status: Admitted, in build-out

The 5-tier material taxonomy under P-DESIGN-022 is admitted and the token catalog is shipped under tables/nimi-ui-tokens.yaml. The perf-downgrade hook-point interface is admitted at the spec level; runtime-side perf-downgrade implementation is in active build-out.

What "Material" Means

In the Nimi design pattern, material describes the surface treatment of a component: how opaque it is, how its backdrop blurs, how it reads against what is behind it. Material is a separate axis from color tone; you can have a solid action button, a glass-thick panel, a glass-chrome overlay — independent from their semantic color role.

Material is a closed 5-tier taxonomy. No app, mod, or feature module may author a parallel material axis.

The 5 Tiers

In ascending opacity / blur intensity order:

TierBackground tokenBorder tokenBackdrop blur
solidResolves through surface.* tone family (no material bg/border token)
glass-thinmaterial.glass_thin.bg (--nimi-material-glass-thin-bg)material.glass_thin.borderbackdrop.blur_thin
glass-regularmaterial.glass_regular.bgmaterial.glass_regular.borderbackdrop.blur_regular
glass-thickmaterial.glass_thick.bgmaterial.glass_thick.borderbackdrop.blur_strong
glass-chromematerial.glass_chrome.bgmaterial.glass_chrome.borderbackdrop.blur_chrome

The blur radii gradient maps to blur_thin / blur_regular / blur_strong / blur_chrome.

The 5-tier set supersedes a prior 3-tier (solid / glass-regular / glass-thick) form. The original tier names are preserved byte-for-byte; glass-thin and glass-chrome are admitted additions.

Consumer Rules

RuleRequired
Consume material via <Surface material="..."> primitive in @nimiplatform/nimi-kit/ui, OR equivalent data-nimi-material="<tier>" marker classYes
Inline rgba(...) material background fillsForbidden
Inline backdrop-filter declarationsForbidden
Hand-picked backdrop-blur-* Tailwind named tokens outside kit-emitted utility classesForbidden
Accent packs override material.* or backdrop.* tokensForbidden (material tokens are neutral foundation-layer)
Adding a 6th tierRequires new admission (not pre-authorized)

The bias toward consuming material through the <Surface> primitive is what keeps tier behavior consistent across apps.

Why The Tiers

Each tier exists for a particular reading purpose:

TierUse
solidHigh-priority surfaces where pixel readability matters most (forms, dense data)
glass-thinSubtle hover / overlay surfaces that should not detach visually
glass-regularStandard glass surfaces (most overlays, side panels)
glass-thickHeavier glass for surfaces that need to dominate over background motion (modals over animation)
glass-chromeThe strongest glass treatment, for chrome-level surfaces (top bars, command palettes)

The taxonomy is opinionated. Authors do not free-mix backdrop-blur values for new visual effects.

Perf-Downgrade Hook-Point Interface

Glass tiers carry GPU cost. The contract reserves a perf-downgrade hook-point interface that runtime implementations can use to step down a higher-cost tier when the device cannot sustain it. Runtime implementation of the downgrade behavior is a separate consumer responsibility; the contract pins the interface so apps can read a degraded tier consistently.

The downgrade does not change the material taxonomy itself — it changes which tier resolves at render time. A surface authored as glass-chrome may render as glass-regular on a degraded device; the authoring contract is unchanged.

Accessibility Contrast Threshold

The contract pins an a11y contrast threshold for material tiers against admitted tone families. Tier choice cannot drop text / boundary contrast below the admitted threshold; consumers that require non-default contrast must use an admitted exception mechanism — not invent a parallel material axis.

Reader Scenario: A Modal Picks Its Tier

An app needs a modal over animated background content.

  1. Pick the tier intent. The modal must read clearly while the background may animate. glass-thick matches.
  2. Use the primitive. <Surface material="glass-thick">...</Surface>.
  3. Token resolution. Background and border resolve from material.glass_thick.*; backdrop blur from backdrop.blur_strong.
  4. Perf downgrade. On a low-power device, runtime may downgrade to glass-regular; the modal still reads.

The author wrote one material="glass-thick" and the rest is admitted.

Reader Scenario: A Mod Tries Inline Glass

A mod author writes inline style=\{\{ background: 'rgba(...)', backdropFilter: 'blur(20px)' \}\} for a custom panel.

  1. Reject. Per consumer rules, inline rgba(...) material background and inline backdrop-filter declarations are forbidden.
  2. Re-route. The mod uses <Surface material="glass-regular"> or whichever admitted tier matches the intent.
  3. Visual consistency. The mod's panel matches every other admitted glass surface in the platform.

Reader Scenario: Wanting A Sixth Tier

A designer proposes a sixth material tier for a new visual context.

  1. Closed taxonomy. The contract does not pre-authorize expansion.
  2. Admission required. The proposal goes through governance: new tier added to tables/nimi-ui-tokens.yaml material category, new blur radii admitted, new tier added to <Surface> primitive's variant set, perf-downgrade interface reviewed.
  3. After admission. The new tier ships with the same consumer rules.

The boundary is intentional: free-form material expansion is what turns a design system into per-app sprawl.

What This Does Not Do

  • It does not let accent packs override material tokens.
  • It does not allow inline glass.
  • It does not let apps invent custom blur values outside admitted Kit utility classes.
  • It does not allow a 6th tier without admission.
  • It does not change tier behavior under perf downgrade — only the resolved tier changes; the authoring contract is stable.

Boundary Summary

ConcernAuthority
5-tier taxonomy + tokensP-DESIGN-022 (this contract)
Token catalogtables/nimi-ui-tokens.yaml
Theme valuestables/nimi-ui-themes.yaml
<Surface> primitive@nimiplatform/nimi-kit/ui
Perf-downgrade interfaceThis contract (spec-level)
Runtime perf-downgrade implementationConsumer responsibility (separate)

Source Basis

Nimi AI open world platform documentation.