Skip to main content
RareUI components are designed for React projects using the App Router. This page covers everything you need to get a Next.js project ready.

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.
The --yes flag uses saved preferences or Next.js defaults. If you want to choose settings interactively, omit the flag and answer the prompts — just make sure to select Tailwind CSS: Yes.
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:
Select Tailwind CSS: Yes. RareUI components rely on Tailwind utility classes and will not render correctly without it.

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 app/ directory and add a layout.tsx file:
app/layout.tsx
Then create a 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 tsconfig.json has the @/* path alias configured. This is required for RareUI component imports.
tsconfig.json
With this alias, you can import components as @/components/rareui/liquid-button instead of relative paths like ../../components/rareui/liquid-button.

Next steps