Docs
Installation
Installation
How to install dependencies and structure your app.
NOTE: We have the exact same installation process as shadcn/ui for Next.js, React, etc.
Add Utilities for React, Next.js, etc. projects
Install dependencies
npm i motion clsx tailwind-merge
Add util file
lib/utils.ts
import { ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
You are good to go and start copy pasting the components into your project.
Vanilla JavaScript
Add the following script to your project head section to use Motion library.
<script src="https://cdn.jsdelivr.net/npm/motion@latest/dist/motion.js"></script>