Skip to content

Guides

Migrating

Move from a runtime component package to DavinciUI's copied source.

If you previously installed a component library as a package, the migration is mostly mechanical: replace the import, copy the source, and delete the runtime dependency.

Before you start#

Commit first

Create a branch and commit the current state. The migration touches imports across many files.

Steps#

Inventory imports

Search for the old package name and list every file that imports a component.

Add the component

Run npx shadcn@latest add @davinciui/<name> for each component you use.

Update imports

Point imports at @/components/ui/<name>.

Remove the package

Delete the old dependency once the build passes.

Import mapping#

| Old | New | | --- | --- | | import { Button } from "old-ui" | import { Button } from "@/components/ui/button" | | import { Card } from "old-ui" | import { Card } from "@/components/ui/card" |

Keep your overrides#

Copied files are yours. Re-apply local changes after the CLI writes a new version, and review the diff before committing.