Replies: 4 comments 4 replies
-
|
I better understand it now. The cn-pattern will be in the raw components in github. They are used to build the various styles. I don't know why I was having an issue with the manual install of the toggle-group. I promise the CSS was not rendering correctly. Anyway, not sure I am a fan of the new shadcn/create anymore. Feels like its added a lot of complexity for not much gain. |
Beta Was this translation helpful? Give feedback.
-
|
So I figured it out. The reason the toggle-group CSS was 'messed-up' was bc when you run the CLI it now installs this in your global.css: Since I have a custom registry without a components.json and I have installed all the components manually, I never would have known I need this. As I understand it, depending on what you select what adding a components.json, it uses this at build time to add the proper CSS for the style you pick luma, mira, etc. So since our custom registry did not use shadnc/create. No idea what to to now to make sure that our components will work predictably. And so now shadcn is utitlizing node modules. I do not get this move at all. Maybe it has some benefits but it sure is making it difficult to update our custom registry. I hope this helps someone. I will continue to research, test, and experiment and post my findings here. |
Beta Was this translation helpful? Give feedback.
-
Understanding Version Mismatches in shadcn-uiI see you've noticed inconsistencies between the website documentation, the source code in the repository, and what the CLI actually installs. This is a common point of confusion for new users! The Root Cause: Why the CLI might look different:
Best Practices for Consistency:
If this helps explain why you're seeing different versions of the code, please mark it as the answer! |
Beta Was this translation helpful? Give feedback.
-
|
yeah this is a bit confusing 😅 you’re basically seeing two different versions:
CLI doesn’t use the nothing is wrong, just not fully consistent right now. if you want safe option → follow CLI kinda feels like they’re still figuring this part out tbh |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The toggle from the repo and website have this code:
The toggle from the CLI install has this code:
So what is going on? What is this new cn-* class pattern? Is it an old pattern now? What is the source of truth?
Beta Was this translation helpful? Give feedback.
All reactions