How to integrate ShadCN components in Opensaas correctly?

I have a few ShadCN components that worked after restructuring the project because '@/components' and '@/libs' paths are not found. However the ShadCN dialog component still isn't working. Can you help me set up the components correctly when calling npm shadcn@latest init and npm shadcn@latest add button dialog etc... I know I'm definitely doing something wrong.
3 Replies
kapa.ai
kapa.ai4w ago
Hi @Juan. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided in the knowledge sources, it seems that some users have had trouble integrating ShadCN with Wasp, but there are some steps you can follow to try and make it work. Firstly, you should add the ShadCN dependency in your wasp.main file. If you're having trouble with the npx command, you can try manual installation as suggested by a community member here (https://discord.com/channels/686873244791210014/1204418933927448657). A community member also shared a gist (https://gist.github.com/infomiho/b35e9366e16913949e13eaba0538f553) on how to use ShadCN with Wasp. You can follow the steps outlined in the gist to set up ShadCN in your Wasp project. If you're still having trouble, it might be helpful to provide more information about the specific issues you're encountering. For example, what steps have you taken, where does it fail, and what version of Wasp are you using? This information can help others in the community provide more targeted assistance. If you're still unable to get ShadCN to work with Wasp, you might consider using a different component library. Some community members have had success with NextUI and Chakra UI. Please note that this information is based on community discussions and experiences, and your results may vary. If you continue to experience issues, you may want to reach out to the Wasp community for further assistance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Juan, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Filip
Filip4w ago
Gist
Using ShadCN with Wasp 0.12+
Using ShadCN with Wasp 0.12+. GitHub Gist: instantly share code, notes, and snippets.
Juan
Juan3w ago
Haven't had a chance but I'll let y'all know once I try it out. Thanks @sodic This worked. @miho thanks for writing the gist up
Want results from more Discord servers?
Add your server