Docs
React.js

React.js

Install and configure Snippet UI for React.js

Information

Snippet UI currently only support React/Next. This project and all components are written in TypeScript. We recommend using TypeScript for your project as well. But it's not required.

Prerequisites

These are the main dependencies you will need to get started.

npm install -D tailwindcss@latest clsx tailwind-merge framer-motion lucide-react

Copy and paste the following code into your project.

// lib/utils.ts
import clsx, { ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
 
export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs));
}

Install components

That's it! Now you can go to any component page and follow the instructions there

You only need to copy + paste the components you need! No bloat or third-party dependencies.