Skip to main content

Installation

Get started with Craft UI by installing the necessary packages and configuring your project.

Prerequisites

Before installing Craft UI, make sure you have the following:
  • Node.js 18.0 or later
  • React 19.0 or later
  • React DOM 19.0 or later

Understanding the monorepo structure

Craft UI is organized as a monorepo with workspace packages. The project contains:
  • @craftdotui/baseui - Base UI components
  • @craftdotui/craftui - Craft UI animated components
  • @craftdotui/loaders - Loading spinners and animations
  • @craftdotui/hooks - Utility hooks
  • @craftdotui/lib - Shared utilities
Craft UI uses a registry-based installation system. Instead of installing packages via npm, you copy components directly into your project. This gives you full control over the code and makes customization easier.

Installation methods

Required dependencies

Craft UI components require the following peer dependencies:

Core dependencies

Styling dependencies

Install Tailwind CSS v4 and related packages:

Component dependencies

Base UI components require:
Craft UI animated components also require:

Configure Tailwind CSS

1

Create your CSS file

Create a globals.css file (or similar) with the following content:
globals.css
2

Import the CSS file

Import your CSS file in your root layout or _app.tsx:
app/layout.tsx
3

Configure PostCSS

Create a postcss.config.js file:
postcss.config.js

Set up utilities

Create a utility file for the cn helper function:
lib/utils.ts
Install the required packages:

TypeScript configuration

Make sure your tsconfig.json includes path aliases:
tsconfig.json

Next steps

You’re all set! Now you can:

Quickstart guide

Build your first component

Browse components

Explore all available components
Make sure you’re using React 19+ as Craft UI components rely on the latest React features.