No background color for shadcn/ui components in T3 app

I started working with a T3 app and couldn't get shadcn/ui styling to behave properly. The problem was that there was no background color on the buttons and badges. I tried the base project with create-next-app and it worked properly, but the base T3 app project has the same problem. Did anyone else have similar issues? The text color inside the button changes based on the ThemeProvider.defaultTheme, but the background remains transparent.
Solution:
I solved the problem while posting the question but decided to keep it for reference. Basically: the "@" directory was in the root of my project instead of src. I moved @/components and @/lib into src, updated component imports and components.json, and everything worked. I think I gave the wrong directory while initializing shadcn....
Jump to solution
1 Reply
Solution
hrnxm
hrnxm11mo ago
I solved the problem while posting the question but decided to keep it for reference. Basically: the "@" directory was in the root of my project instead of src. I moved @/components and @/lib into src, updated component imports and components.json, and everything worked. I think I gave the wrong directory while initializing shadcn.
Want results from more Discord servers?
Add your server