Replies: 1 comment 1 reply
-
@cwikio even manual installation suposes that you runned init cli (see more here) command that installs the dependencies, but maybe it should be more explicity , the problem is that major components use cn |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just tried to install accordion (https://ui.shadcn.com/docs/components/accordion) in my nextjs app and it simply does not work how the instruction says. The reason for that is because I did not have the imported import { cn } from '@lib/utils'. so after googling 2h I finally found the solution i.e. the 2 missing steps that are NOT mentioned (or intuitive) in the instructions: 1) install class-variance-authority 2) create the actual utils file. The full instructions are here: https://www.neorepo.com/blog/how-to-build-a-button-with-nextjs-and-shadcn-ui
For the creators of chadcn-ui, I know you are top-experts and these kind of things are very silly and obvious for you, but please write the instructions explicitly with step-by-step approach and run a "mum test" i.e. if your mum cannot understand it from just reading it, it means you did not do the explanation clearly enough.
Many thanks I love your work!
Beta Was this translation helpful? Give feedback.
All reactions