Skip to content

Instantly share code, notes, and snippets.

@josippapez
Created March 2, 2024 11:36
Show Gist options
  • Select an option

  • Save josippapez/953cc4e01811cec6539609955dc09cf7 to your computer and use it in GitHub Desktop.

Select an option

Save josippapez/953cc4e01811cec6539609955dc09cf7 to your computer and use it in GitHub Desktop.
Tailwind merge
import { clsx } from "clsx";
import { ClassNameValue, extendTailwindMerge } from "tailwind-merge";
const extendedTwMerge = extendTailwindMerge({});
// used for merging tailwind classes with clsx
export function cltm(...args: ClassNameValue[]) {
return extendedTwMerge(clsx(args));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment