Skip to content

Instantly share code, notes, and snippets.

@floatrx
Created May 28, 2024 18:04
Show Gist options
  • Save floatrx/dbc079d277491362c584083be6b67846 to your computer and use it in GitHub Desktop.
Save floatrx/dbc079d277491362c584083be6b67846 to your computer and use it in GitHub Desktop.
Tailwind lib utils
import { type ClassValue, clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
// Tailwind CSS classnames utility
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