#Does anyone know why my my tailwind styles aren't getting applied?
11 messages ยท Page 1 of 1 (latest)
What do you mean ? left part has a tailwind feel ๐ค
what makes you thinkthey're not applied?
i was following shadcn docs to build an shadcn + astro project. styles re appplied for shadcn components (which are react) but when i use in my .astro files, styles are. not applied (see bg-red-500 in the screenshot above which is not applied on the ui).
turns out i got installed both tailwind.config.js and tailwind.config.mjs.
astro cli automatically created the .js variant but shadcn cli autosuggested .mjs which i missed out
prefer .mjs ๐
why tho?
There are a few things to know about shadcn ui: if you have some components that communicate together through context (eg. Accordion), you need to use them in react files because of the way astro works
because mjs means we run js in an ESM context, not CJS. Since Astro is ESM only, it's better
thanks for these knowledge bits, apprecite that. 
You're welcome!
hey, im using shadcn components as well but am not able to add any classes to the components. I have tailwind installed in the project so im not sure what im missing