System requirements
Before you begin, ensure your environment meets these requirements:- Node.js 18.17 or later
- macOS, Windows (including WSL), or Linux
Quick setup
The fastest path is the automatic setup tool, which scaffolds everything in one command.1
Create a new project
Run the following command to create a new Next.js app. The
--yes flag accepts all recommended defaults: TypeScript, Tailwind CSS, ESLint, App Router, Turbopack, and the @/* import alias.2
Start the development server
Navigate into the project directory and start the dev server.
3
Open in your browser
Visit
http://localhost:3000 to confirm the app is running. You should see the Next.js default welcome page.Interactive setup
If you prefer to configure each option manually, run the command without--yes:
1
Run the command
2
Answer the prompts
You’ll be asked a series of questions. For RareUI compatibility, select these options:
Manual installation
If you need to add Next.js to an existing project, follow these steps.1
Install packages
2
Add scripts to package.json
package.json
3
Create the app directory
Next.js uses file-system routing. Create an Then create a
app/ directory and add a layout.tsx file:app/layout.tsx
page.tsx:app/page.tsx
TypeScript setup
RareUI components are written in TypeScript. We strongly recommend using TypeScript for the best experience.1
Enable TypeScript
If you used
create-next-app with TypeScript enabled (the default), you already have a tsconfig.json. If not, rename any .js file to .tsx and run next dev — Next.js automatically creates the tsconfig.json.2
Configure path aliases
Ensure your With this alias, you can import components as
tsconfig.json has the @/* path alias configured. This is required for RareUI component imports.tsconfig.json
@/components/rareui/liquid-button instead of relative paths like ../../components/rareui/liquid-button.Next steps
- Install Tailwind CSS — verify your Tailwind setup
- Add utilities — install
framer-motionand thecn()helper - CLI — use the CLI to add components