Docs
Installation
Add DavinciUI to an existing React project in about five minutes: prepare the project, initialize shadcn, register the @davinciui namespace, install one component, and render it.
Prerequisites#
- Node.js 18 or later.
- A React project — Next.js App Router or Vite. TypeScript is recommended.
- Tailwind CSS v4 set up in the project. DavinciUI components are styled with Tailwind utilities and CSS variables.
- Internet access to the registry at
davinciui.com/r.
Info
Create or open a supported project#
For a new project with Next.js:
pnpm create next-app@latest my-app --typescript --tailwind --eslintOr open your existing Vite or Next.js app — DavinciUI components are self-contained files, so there is no starter template and no extra setup beyond Tailwind. Success looks like: your app builds and Tailwind utilities apply before you continue.
Initialize shadcn#
This creates components.json and the cn utility. Run it in the project root:
pnpm dlx shadcn@latest initChoose New York style, Neutral base color, and enable CSS variables. Success looks like: a components.json file at the project root. Every prompt answer is explained in Configuration.
Register DavinciUI in components.json#
Tell the CLI where the DavinciUI registry lives. Without this block, the CLI cannot resolve @davinciui/* names. Add it to components.json:
{
"registries": {
"@davinciui": "https://davinciui.com/r/{name}.json"
}
}{name} is a placeholder the CLI fills with the component slug. See Configuration for the full file and Registry for how resolution works.
Install a first component#
Pick any component from Components and add it:
pnpm dlx shadcn@latest add @davinciui/text-morphThe CLI copies the component to @/components/ui (or wherever your aliases.ui points) and installs its npm dependencies. Success looks like: a new components/ui/text-morph.tsx file in your repo — you own the code and can edit it freely.
Render and verify it#
Import from the installed path and render:
import { TextMorph } from "@/components/ui/text-morph"
export default function Page() {
return <TextMorph words={["Design", "Animate", "Delight"]} />
}Success looks like: the words cycle with a fluid morph animation. If the text renders but does not animate, check that framer-motion was installed and that you restarted the dev server after adding new dependencies.
Common installation problems#
- “Could not resolve @davinciui/…” — the
registriesblock is missing or misspelled incomponents.json. Re-check the namespace against the snippet above. - Import errors after install — your
tsconfig.jsonpaths do not match thealiasesincomponents.json. Align them, then reinstall. - Missing dependency at runtime — confirm the package manager finished and restart the dev server. Animated components need
framer-motion; icon-driven ones needlucide-react. - Stale output after editing — installed files are yours, not live-linked. If a re-install does not pick up registry changes, pass
--overwriteto replace local files.
Still stuck? The CLI reference covers failure recovery, and a representative end-to-end example lives on the Text Morph page.
No CLI?
Copy the source directly from the component page — every page shows the full code and required dependencies. The CLI is just a shortcut.

