Consensus on building components that are shared across projects? #7401
erickreutz
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! Using tailwind and loving it. I had a general question though that I can't seem to find a straight answer to. I'm wondering if there is a general consensus on how to build components that are shared across projects that have potentially different styles and themes? It's my understanding that if I build a component with a certain tailwind config and then import that component into a project that could potentially have a different tailwind config - the styles would not work as originally intended on the imported component and things would clash unintentionally.
Is using
prefix
the suggested way to solve this? Using@apply
to modulize component styles with traditionalBEM
likeclass names? Make all the shared components headless?
I'd like to build some components using tailwind and re-use them across projects that have different styles. What is the preferred approach here?
Beta Was this translation helpful? Give feedback.
All reactions