Skip to content
2k
On This Page

Migration

Move a project from solidui-cli 0.7 on Solid 1 to Solid UI for Solid 2.

You don't have to migrate right away

Projects on Solid 1 keep working with solidui-cli@0.7.2, which installs from the previous registry. Migrate when your app moves to Solid 2.

What changes

Areasolidui-cli 0.7Solid UI for Solid 2
FrameworkSolid 1, SolidStartSolid 2 with Vite and @solidjs/vite-plugin
PrimitivesKobalte, Corvu, Ark UI, cmdk-solid, solid-sonnerUI SDK
Tailwind CSS3, with tailwind.config.cjs4.3 or later, configured in CSS
ThemeHSL variables in your app stylesheetPreset tokens in a generated solid-ui.css
Configurationui.config.jsoncomponents.json
LanguageTypeScript or JavaScriptTypeScript
Dark mode.dark or Kobalte’s [data-kb-theme="dark"].dark on an ancestor

Your imports keep working: both versions put components in ~/components/ui and the cn helper in ~/lib/utils.

Migrate a project

Upgrade to Solid 2

Follow Solid’s migration guide. Solid UI needs a Vite app with @solidjs/vite-plugin; SolidStart projects aren’t supported yet.

Upgrade to Tailwind CSS 4

Run Tailwind’s upgrade tool. It moves your tailwind.config.cjs into CSS and updates your classes:

pnpm dlx @tailwindcss/upgrade

Then remove what Solid UI 0.7 added to your stylesheet and config: the :root and .dark blocks with HSL variables such as --background: 0 0% 100%, the color, radius and accordion entries that point to them, and tailwindcss-animate. The new solid-ui.css defines all of them, and the old variables would override it with values that no longer work. Keep your own styles.

See Tailwind’s upgrade guide for the other changes.

Run init

Delete ui.config.json and run init:

pnpm dlx solidui-cli@latest init

Pick the preset closest to your old theme, or build one on the Create page and pass its code with --preset. If you used Kobalte’s color mode, toggle the dark class on <html> instead of data-kb-theme.

Re-add your components

Commit your work, then add the components you use again. --overwrite replaces the old Kobalte and Corvu versions:

pnpm dlx solidui-cli@latest add button dialog select --overwrite

Compare the diff and merge back your own edits. Components that were renamed or removed are listed below.

Update your component usage

The components follow UI SDK’s API now. Update the places that use the props in API changes, then check each page in the components docs for its parts.

Remove the old packages

Uninstall the packages Solid UI 0.7 installed and nothing else uses:

npm uninstall @kobalte/core @corvu/drawer @corvu/otp-field @corvu/resizable @ark-ui/solid cmdk-solid solid-sonner embla-carousel-solid chart.js tailwindcss-animate

API changes

Previous APICurrent API
as={Button} on primitive partsrender={(partProps) => <Button {...partProps} />}
options, optionValue, optionLabel, itemComponent, sectionComponentExplicit items and groups, usually rendered with For
Collection onChangeSelect and Combobox onValueChange, Command onAction
onInputChangeonQueryChange
Select-generated content and listYour children inside SelectContent
Custom Combobox chip state and removalComboboxValue, ComboboxChips, ComboboxChip and ComboboxChipRemove
Root popup placement and gutterContent side, align and sideOffset
Checkbox indeterminate booleanchecked="indeterminate"
Checkbox and Switch onChangeonCheckedChange

Object values still work through itemToValue and itemToLabel.

Renamed and removed components

solidui-cli 0.7Now
text-fieldInput, Textarea and Field
otp-fieldInput OTP
sonnerToast
date-pickerDate Picker, composed from Calendar and Popover
calloutAlert
charts, number-fieldNot available yet
badge-delta, bar-list, flex, grid, progress-circle, timelineRemoved; use Tailwind CSS layouts or keep your copies