Get StartedAdd Utilities

Add Utilities

This code is widely used in Luxe, it is responsible for merging classes when they have conditionals.

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

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