#About Cn function / cn()

1 messages · Page 1 of 1 (latest)

quaint merlin
#

Quick question. Where should I import cn function from?

opaque sequoiaBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

opaque swift
# quaint merlin Quick question. Where should I import cn function from?

normally it should be automatically installed after you installed tailwind or shadcn and placed inside your utils.ts in your /lib folder. If you dont have it:

import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";

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

thought it was a built in function

opaque swift
opaque sequoiaBOT