Issue #950
Inspired by shadcn
Combine
- tailwind-merge: Utility function to efficiently merge Tailwind CSS classes in JS without style conflicts.
- clsx: constructing className strings conditionally.
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}