Skip to content
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

Switch to newyork #2570

Closed
thunder-007 opened this issue Jan 25, 2024 · 7 comments
Closed

Switch to newyork #2570

thunder-007 opened this issue Jan 25, 2024 · 7 comments

Comments

@thunder-007
Copy link

I installed the project with default theme now I want to switch to new york what can I do.

@pippinmole
Copy link

click on Customize, and choose New York. Then, click on Copy Code and copy and paste the code into your CSS file.

This won't affect the button heights, etc. You need to:

  1. Go into your components.json file, and change style from default to new-york.
  2. Run the CLI tool to import each component again, choosing yes to override the component with the new-york style:
> npx shadcn-ui@latest add button

√ Component button already exists. Would you like to overwrite? ... yes
✔ Done.

@thunder-007
Copy link
Author

@pippinmole Thanks bro

@kgeekInCominty
Copy link

Go to https://ui.shadcn.com/themes and click on Customize, and choose New York. Then, click on Copy Code and copy and paste the code into your CSS file.

Yeah but you need as well to reinstall the component to override it

@rahulgawale
Copy link

rahulgawale commented Apr 26, 2024

You need to add --overwrite flag to reinstall the components

for example:
npx shadcn-ui@latest add button --overwrite

@gnomegl
Copy link

gnomegl commented Aug 16, 2024

If you're on Linux or Mac you can use this to iterate and update all of the file names in your ui folder:

npx shadcn-ui@latest add src/components/ui/*(:t:r) --overwrite

@joeblau
Copy link

joeblau commented Nov 30, 2024

If you're on Linux or Mac you can use this to iterate and update all of the file names in your ui folder:

npx shadcn-ui@latest add src/components/ui/*(:t:r) --overwrite

update:

npx shadcn@latest add src/components/ui/*(:t:r) --overwrite
image

@memben
Copy link

memben commented Dec 6, 2024

The glob syntax did not work for me, this however worked like a charm for me :):

for component in src/components/ui/*; do
  npx shadcn@latest add $(basename $component .tsx) --overwrite
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants