Skip to content
nexubDesign System
v12.7.0

Getting Started

Migrating to 12.0

Migrating to

12.0 changes one default and removes one deprecated value (RFC 12.0). Both can be cleared on 11.9, its release candidate, before you upgrade. It also deprecates the Tailwind v3 compatibility defaults (removed in 13.0) and promotes 27 components to stable. Nothing else in the API changes.

Upgrade in two steps

11.9.x is the release candidate for 12.0. Stop there first if you are on an older 11.x, and move every @nexub package you use together:

Terminal
npm install @nexub/react@11.9 @nexub/themes@11.9 @nexub/tokens@11.9 @nexub/icons@11.9

On 11.9, switch to the opt-in layered stylesheet (below) and clear what deprecated-in-11 finds. An app that runs clean like that upgrades with a version bump. After the bump, run changes-in-12:

Terminal
npx nexub-migrate --rules changes-in-12          # dry run: the diff and the items to review
npx nexub-migrate --rules changes-in-12 --write  # apply the rewrites
npx nexub-migrate --rules changes-in-12 --check  # CI: exit 1 while anything is left

What changes by default: one nexub cascade layer

Until 11.x the prebuilt stylesheets declared Tailwind's own layer names (theme, base, components, utilities). In an app that also uses Tailwind v4, its utilities and ours shared one utilities layer, so the stylesheet that loaded last won a tie. In 12.0 every style moves under one nexub layer:

CSS
/* 11.x */
@layer theme, base, components, utilities;
/* 12.0 */
@layer nexub.theme, nexub.base, nexub.components, nexub.utilities;
StylesheetIn 12.0
@nexub/react/styles.cssEvery layer under nexub
@nexub/react/styles.nexub-layer.cssThe 11.9 opt-in name: the same file as styles.css, kept in 12.x so early switchers keep working
@nexub/patterns/styles.css, @nexub/marketing/styles.css, @nexub/diagram/styles.css and theme.cssEvery layer under nexub, so one @layer nexub; covers every package
@nexub/themes/*Unchanged: you import them into your own base layer

A layer ranks by where it is first named, so name nexub at the top of your own CSS and the import order stops mattering. Where depends on whether the app uses Tailwind:

CSS
/* Tailwind v4 app: after preflight (base), before your components and utilities */
@layer theme, base, nexub, components, utilities;

/* no Tailwind: first, so every style of yours wins */
@layer nexub;

With Tailwind, putting nexub first would put it under preflight, and preflight's element resets would win over our component rules wherever both set a property, because a layer beats specificity. After base, your utilities still win and preflight can't undo our styles.

Without that line, load our stylesheets before your own CSS. If a nexub stylesheet loads after your layers, nexub is named last and ranks above them. Measured in Chromium, WebKit and Firefox (packages/react/visual/layers.spec.ts).

What to check: a style of yours that only won before because your file loaded later still wins, and one that lost to ours because ours loaded later now wins. That is the point, but look at screens where you styled :focus-visible or overrode a component's colours. changes-in-12 points imports of styles.nexub-layer.css back at styles.css.

What breaks: Stepper current={-1}

current={-1} meant “every step done”. It was deprecated in 11.4; give the steps a status instead. In 12.0 a negative current throws in development and counts as 0 in production.

TSX
// before
<Stepper current={-1} steps={[{ label: 'Account' }, { label: 'Payout' }]} />

// after: what changes-in-12 writes for a literal steps array
<Stepper current={1} steps={[{ label: 'Account', status: 'complete' }, { label: 'Payout', status: 'complete' }]} />

changes-in-12 rewrites it when steps is an array of object literals, keeping a step's own status, and reports every other case. Screen readers read each step as “complete”, as before. See Stepper.

Deprecated: the Tailwind v3 compatibility defaults

@nexub/react/styles.css still restores a few Tailwind v3 defaults that v4 changed, so components look the same in a v3 or a v4 app: a bare border takes the hairline colour instead of currentColor, and placeholders keep the v3 colour. They stay in 12.x, deprecated, and are removed in 13.0. Nothing changes when you upgrade to 12.0. Before 13.0, set any of these defaults your own screens rely on in your own base layer.

Promoted to stable

27 components move from beta to stable, because each one is used in production by at least two products (GOVERNANCE.md). Their API doesn't change, only the badge:

ActionBar, BarChart, CheckboxCard, DateTimePicker, DonutChart, EventCalendar, Funnel, Gauge, Heatmap, Kanban, KpiTile, LineChart, MessageBubble, MoneyInput, MultiSelect, PromptInput, RadioCard, SavedViews, Sortable, SplitButton, Stepper, ThinkingIndicator, TimePicker and TreeView, plus the ErrorSummary, Conversation and ListDetail patterns.

Coming from 10.x

Migrating to 11.0 first. Then this page.