Upgrade to 2.0
Breaking changes and the migrate command for SIGMA-UI 1.x projects.
SIGMA-UI 2.0 is a new major version of the CLI and the component registry. Existing 1.x projects keep working until you upgrade. Run migrate before add, then compare your local files with the 2.0 registry.
Breaking changes
- Tailwind CSS v4 only. New and migrated Tailwind projects use
@import "tailwindcss",@theme, and@tailwindcss/vite. Tailwind 3 JavaScript config files can stay as@config, but new utilities such asbg-accentandsidebar-*need theme tokens that 1.x never defined. - Theme CSS is no longer HSL triplets. 1.x stored
--primary: 240 5.9% 10%and usedhsl(var(--primary))in Tailwind. 2.0 components usevar(--primary)(and Tailwind maps--color-primaryto that value).migratewraps triplets ashsl(...)or adds an@themehsl(var(--token))mapping, and fills in missingaccentandsidebar-*tokens. - Animations use
tw-animate-css. Replacetailwindcss-animate.migrateadds the import and can install the package. - Component directories are kebab-case.
Button/becomesbutton/. File names still followcomponentNaminginsigma-ui.config.json. - Config shape.
styleisstyleSystem,tailwind.cssiscssPath,aliases.uiisaliases.components. diffis deprecated. It still works, prints a warning, and runsadd --diff. Usenpx sigma-ui add --diff(ornpx sigma-ui add button --diff) instead.
migrate
From the project root:
npx sigma-ui migrateUsage: npx sigma-ui migrate [options]
upgrade a sigma-ui 1.x project to 2.0: config, kebab-case directories, imports, and theme CSS
Options:
-y, --yes skip the confirmation prompt
-c, --cwd <cwd> the working directory
--dry-run show the planned changes without writing anythingThe command:
- Rewrites
sigma-ui.config.jsonto the 2.0 schema. - Renames PascalCase component directories to kebab-case and updates imports.
- Patches the theme stylesheet: HSL triplets, missing
accent/sidebar-*tokens, Tailwind 4@import/@theme, andtw-animate-css. - Registers
@tailwindcss/vitewhen the project uses Tailwind.
Use --dry-run to print the plan. After it runs, compare components with the registry:
npx sigma-ui add --diffAdding components to a 1.x project
sigma-ui add refuses to install into an unmigrated 1.x layout. If it sees PascalCase component folders or a 1.x stylesheet, it tells you to run migrate first. That avoids creating lowercase folders next to the old PascalCase ones.
New projects
npx sigma-ui init
npx sigma-ui add buttoninit writes a Tailwind v4 or CSS stylesheet, registers @tailwindcss/vite for Tailwind apps, and adds @types/node on Vite so vue-tsc can type node:url in the Vite config.
CSS style system
CSS-style 2.0 components read colors as var(--primary). If migrate finds HSL triplets, it wraps them as hsl(240 5.9% 10%). There is no utils file unless you add Tailwind; blocks that used valueUpdater from @/lib/utils now define that helper locally.
migrate also adds @layer base, components; to the top of the stylesheet and imports preflight.css into the base layer. 2.0 component styles live in @layer components, so your unlayered CSS overrides them. Unset borders now use var(--border) from the theme instead of the text color. Global element rules in your own CSS (code, h1, a) now win over component styles too; move them into @layer base if a component looks off. If another stylesheet imports preflight.css without layer(base), its resets beat the component styles (buttons lose their padding and borders); migrate lists those files. See Overriding component styles.
Nuxt
Install sigma-ui-nuxt and point sigmaUi.componentDir at aliases.components. See Nuxt installation.