Getting Started

fern-ui is a collection of minimal, accessible components built with React, Tailwind CSS, and Radix UI primitives. Copy the components you need into your project.

Installation

Start by installing the required dependencies:

bash
# Install dependencies
pnpm add class-variance-authority clsx tailwind-merge radix-ui lucide-react

Utility Function

Add the cn utility for merging Tailwind classes:

lib/utils.tstypescript
// lib/utils.ts
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs))
}

Components

Browse available components below