Skip to content

Instantly share code, notes, and snippets.

@Deri-Kurniawan
Last active November 21, 2023 13:41
Show Gist options
  • Save Deri-Kurniawan/e4b0e28d5b71260c0eecb009ed5f7523 to your computer and use it in GitHub Desktop.
Save Deri-Kurniawan/e4b0e28d5b71260c0eecb009ed5f7523 to your computer and use it in GitHub Desktop.
Tailwindcss class merger function
import { type ClassValue, clsx } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment