Next.js Discord

Discord Forum

Nextui: cn is not defined

Unanswered
Asiatic Lion posted this in #help-forum
Open in Discord
Asiatic LionOP
I just copied the example code for a slider and it doesn't work. What's cn?

11 Replies

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

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


https://ui.shadcn.com/docs/installation/manual
Asiatic LionOP
?
Asiatic LionOP
yeah as always, but I wonder why they don't mention that
it worked with web3butter.eth code
workin
alr
@Asiatic Lion if I am not wrong, cn must be classnames library
install above library and import cn from classnames
Asiatic LionOP
I see