Next.js

Step-by-Step configuration for Next.js

# Prerequisites

Before installing CodeKabir UI, ensure you have:

  • Node.js 18.17 or later
  • A Next.js 13+ project (tested with Next.js 15.2.1)
  • React 18+ and React DOM 18+

# Create New Project

If you don't have a Next.js project yet, you have two options:

1.Create a new Next.js project

Start fresh with a new Next.js application configured with TypeScript and Tailwind CSS:

Terminal
Loading syntax highlighting...

For detailed setup instructions, visit the official Next.js documentation

2.Clone our example project

RECOMMENDED

Get started quickly with our pre-configured Next.js template:

Terminal
Loading syntax highlighting...

This template includes TypeScript, Tailwind CSS, all required dependencies, and example components.

# Setup UI Config

1

Install Dependencies

Core Dependencies:

Install Dependencies
Loading syntax highlighting...

Icon Dependencies:

CodeKabir UI uses Remix Icons. Choose one of the following options:

Option 1: React Icons
RECOMMENDED
Install React Icons
Loading syntax highlighting...
Option 2: Dedicated Remix Icons
Install Remix Icons
Loading syntax highlighting...
Note: Import paths differ between packages

• React Icons: import { RiHeartFill } from "react-icons/ri"

• Remix Icons: import { RiHeartFill } from "@remixicon/react"

Dev Dependencies:

Install Dev Dependencies
Loading syntax highlighting...
2

Configure Tailwind CSS

Update your tailwind.config.ts file with CodeKabir UI configuration:

tailwind.config.ts
Loading syntax highlighting...
3

Setup Utility Functions

Create the essential utility function for merging CSS classes. Create src/lib/utils.ts:

lib/utils.ts
Loading syntax highlighting...

This utility function combines clsx for conditional classes and tailwind-merge for proper Tailwind class deduplication.

4

Configure Inter Font

CodeKabir UI uses Inter font for optimal readability. Update your src/app/layout.tsx:

app/layout.tsx
Loading syntax highlighting...
5

Setup Dark Mode (Optional)

CodeKabir UI includes comprehensive dark mode support. To enable it:

1. Create a theme provider component:

components/theme-provider.tsx
Loading syntax highlighting...

2. Update your layout to include the theme provider:

app/layout.tsx (Updated)
Loading syntax highlighting...
6

Add Global Styles

Add CodeKabir UI styles to your src/app/globals.css:

app/globals.css
Loading syntax highlighting...

# Verification

Test your installation by creating a simple component. Add this to any page:

Test Component (Verification)
Loading syntax highlighting...

Success! If the button renders correctly with proper styling, your CodeKabir UI installation is complete.

# What's Next?

Now that CodeKabir UI is installed, you can:

  • Explore the Components documentation to see all available components
  • Check out Usage examples to learn best practices
  • Customize the design system by modifying your Tailwind configuration
  • Join our community for support and updates
Need Help?

If you encounter any issues during installation, check our troubleshooting guide or reach out to our community for assistance.