csssnippettailwindcss

Tailwind Utility: CLSX meets Tailwind-merge

January 27, 2023|1 min read


hello
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
 
function cn(...args: ClassValue[]) {
  return twMerge(clsx(args));
}
utils.ts
Thanks for reading!