Using different resources to style pages #
For styling HTML/web pages, can we use different libraries/resources at the same time? For example, we may like to use navbar from bootstrap and use tailwind CSS to style other components and at the same time use pure CSS for other components on the same page. Will this be possible or will it create conflicts?
8 Replies
yes, it's possible. And yes, it probably will create conflicts, especially combining bootstrap and tailwind.
you can combine either with vanilla CSS without any issues though, and very likely always will ( or at least should in the case of Tailwind)
What about pre made components provided by UI libraries like Daisy UI, material UI or Ant Design? Can i fetch different components from different libraries at same page?
It Depends™️
If there's colliding class names, especially if your framework doesn't scope its css, there'll be issues. But a lot of the time it'll probably work?
Thanks for helping out.
I have faced issue of conflict between bootstrap and tailwind.
I imagine so, they've both got a ton of utility classes with obvious names
mixing ui frameworks is a shortcut for disaster
not to mention the bloat
avoid it at all costs
But sometimes while using UI libraries, we don't get desired components from a single source. We have to use components from different sources. In such case, will there be conflict? I am not referring to bootstap and tailwind in this case. I am taking about pre-built components.
probably, you cant know until you try
if you need specific components, try checking shadcn