Shadcn questions
Good evening,
Sorry to bother you, but
I’m working on a project with Next JS (App Router) at my work and I tried you use shadcn ui in the project, but I faced some obstacles and problems.
I listed them in a list if you could help with this:
1- shadcn depends on “tailwind” -- I don’t use tailwind in the project but vanilla CSS with CSS-Modules, I was afraid of tailwind overriding my styles but I installed tailwind and it didn’t override anything, but once I installed shadcn the overriding happens,
My questions is there is any way to use shadcn with “tailwind” but without overriding the original CSS styles (Like the styles only apply to the shadcn components without the other parts of the project)
2- I faced some problems with components regardless typescript (i used the javascript version, not the typescript)
In the CLI I choose javascript but there was a typescript error is there any options or settings I’m missing or should change if I will use Javascript.
3- The DatePicker component didn’t work at all, the error was due to (can’t resolve some icons from lucide) I checked in the node modules lucide was installed but the dist folder was empty and the required icons weren’t available.
4- For the RSC part I have a question here The installation part
Asks for this and as I understand it’s adding use client to the client components
“Whether or not to enable support for React Server Components.
The CLI automatically adds a use client directive to client components when set to true.”
Does this mean even if i chose NO, the CLI will add a “use client”? And add it to which components I don't understand the shadcn ones or any components in the project?
5- My last question is about the “aliases”, I don’t understand this part in the docs in my Nextjs I use the default aliases configured when starting a new Nextjs Project
{
"compilerOptions": {
"paths": {
"@/": ["./src/"]
}
}
}
What I need to add or change?
Thanks in advance.
0 Replies