Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
2 replies
haitam

stop using prefix with tailwindcss

Yes, just DO NOT USE PREFIX WITH TAILWIND, unless you have a really good reason to

it makes your components not useable, for people who just want to use them.
or if you want to make it a component and use it in another project, it will add unnecessary extra steps.

i found out that some people use prefix, from the nextra project
i was trying to import it to be used in app directory with some special tools, and i had to fork the entire project and theme just to change that nx- prefix
it was devastating,

and no, i'm not gonna use their prefix, because i also have my components that doesn't use it, so i just decided to fix their issue

at last I made it all work.

The point is reusability and ease of forking.
Make beautiful websites with Next.js & MDX.
Nextra – Next.js Static Site Generator – Nextra
Was this page helpful?