Skip to content

Getting started

Quickstart

Install the shadcn CLI, add the @davinciui registry, and render your first component in about five minutes.

This quickstart takes an existing React project with Tailwind CSS to a rendered DavinciUI component. If you are starting from scratch, follow the shadcn installation guide first so you have a components.json file.

Before you begin#

  • Node.js 20 or newer.
  • A React 19 project with Tailwind CSS v4.
  • A components.json file created by the shadcn CLI.
No runtime package

DavinciUI is distributed through the shadcn registry. The CLI copies component source into your project, so there is no package to upgrade later.

Add the registry#

Open components.json and add the @davinciui namespace under registries:

components.json
{
  "$schema": "https://ui.shadcn.com/schema.json",
  "style": "new-york",
  "rsc": true,
  "tsx": true,
  "tailwind": {
    "config": "",
    "css": "app/globals.css",
    "baseColor": "neutral",
    "cssVariables": true
  },
  "aliases": {
    "components": "@/components",
    "utils": "@/lib/utils",
    "ui": "@/components/ui",
    "lib": "@/lib",
    "hooks": "@/hooks"
  },
  "registries": {
    "@davinciui": "https://davinciui.com/r/{name}.json"
  }
}

If your project already has a registries object, add the @davinciui key to it instead of replacing the object.

Add a component#

Install the component
npx shadcn@latest add @davinciui/button
Check the files

The CLI writes the component to components/ui/button.tsx and installs any missing dependencies.

Render it
app/page.tsx
import { Button } from "@/components/ui/button"
 
export default function Page() {
  return <Button>Ship it</Button>
}

Where to go next#

Do I need to install a runtime package?

No. The registry copies source files into your project. There is no @davinciui/react dependency.

Can I edit the copied component?

Yes. The files are ordinary React and Tailwind source. Change them like any other file in your app.

How do I update a component?

Run the add command again. Review the diff before committing so local edits are not overwritten.