npx rareui@latest init followed by npx rareui@latest add, these are installed automatically. If you are setting up manually, follow the steps below.
Install dependencies
Install class merging utilities
clsx and tailwind-merge are used by every RareUI component for conditional and conflict-free class name composition.Install Framer Motion
Framer Motion powers all RareUI animations. Install the
motion package (the modern name for framer-motion v12+).If you are using React 19 and see peer dependency warnings, add an
overrides block to your package.json (see below). This is a temporary workaround until the upstream package resolves React 19 support.package.json
Path alias configuration
RareUI components import from@/lib/utils using the @/* alias. Verify your tsconfig.json has this configured:
tsconfig.json
create-next-app, this alias is already present. The next.config.ts file also picks it up automatically.
Full dependency summary
| Package | Purpose | Required |
|---|---|---|
framer-motion | Component animations | Yes |
clsx | Conditional class names | Yes |
tailwind-merge | Tailwind class conflict resolution | Yes |
lucide-react | Icons used in some components | Some components |
Next steps
- CLI reference — add components with a single command
- Quickstart — add your first component end to end