Next.js Discord

Discord Forum

Nextui: cn is not defined

Unanswered
Barbary Lion posted this in #help-forum
Open in Discord
Barbary 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
Barbary LionOP
?
Barbary LionOP
yeah as always, but I wonder why they don't mention that
it worked with web3butter.eth code
workin
alr
@Barbary Lion if I am not wrong, cn must be classnames library
install above library and import cn from classnames
Barbary LionOP
I see