Carlos Dubón
BlogCreatingContactUsesResume
HomeBlogCreatingContactUsesResume

Oct 15, 2024

cn

Utility function that combines the functionality of classnames and tailwind-merge.

import classnames from "classnames";
import { twMerge } from "tailwind-merge";
 
export const cn = (...inputs: Parameters<typeof classnames>) =>
  twMerge(classnames(...inputs));

Enjoy my content? Stay updated with my newsletter.

No spam, just useful updates. Read privacy policy.
Carlos Dubón
Carlos Dubón
Software Engineer
© 2024-present Carlos Dubón. All Rights Reserved.

General

  • Home
  • Creating
  • Contact
  • Resume

Writing

  • Blog
  • Snippets
  • Uses

What I’m listening to

Not playing
Spotify