-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change default ui directory #1156
Comments
According to CLI docs, there's a -p (or --path) option that should do the trick, however after testing it, that didn't work. It keeps installing the component in the /src/components/ui folder. Here's what I have tried:
https://ui.shadcn.com/docs/cli There exist many issues related to this bug if you need more info. Here's one of them: |
This is something I'm looking into. It's currently hardcoded to UI but definitely something that we'll make configurable. Assigning this to me. |
Any update on this @shadcn? |
@Stefandasbach I haven't had time to look into it yet. For now, as a workaround, you can provide --path when adding components.
|
Looks like this still isn't working with |
The workaround doesn't work as well :( I hope this option is enabled soon so adoption for existing projects is easier. |
Bumping this up, would love to be able to configure a default path on components.json for CLI to reference |
Bump this again, really need this kind of feature |
2 similar comments
Bump this again, really need this kind of feature |
Bump this again, really need this kind of feature |
Hoping to have this soon |
Bumping again pls add |
Change the path setting in the components.json then run the cli again. |
Any update on this @shadcn? |
@shadcn I know you're busy but I tracked down the line which seems to be blocking the workaround ui/packages/cli/src/utils/registry/index.ts Line 121 in 1cf5fad
|
Update: Back from vacation. Working on this now. |
@shadcn if it's a simple fix but you don't have time to work on it, let me know I'd love to sync on it and be able to contribute. And I'm on PTO this week so have the time :) |
#2266 closes this |
Yes. I believe this is fixed #2266. Please reopen if not. Thank you. |
I don't think this is working. Tried: |
To customize the installation path for ShadCN/UI components, follow these steps:
Example:
|
I modified my The |
for test purpose i"ve done this :
rr7, dont want lib in app/lib I would've have expected the generated components using this alias for lib (... Probably a skill issue; but as of now changing this alias does not seem to have any effects. thank for clarifying |
Is it possible to change the default
ui
directory? I'd like the CLI to install new components into@/components/ui-library
instead of@/components/ui
. ThanksThe text was updated successfully, but these errors were encountered: