How to import bootstrap partially in angular application?


When I am using bootstrap by adding the CSS class in "styles" from angular.json, it overriding some angular material CSS styles globally. Is there any way to use bootstrap in only some selected components which will not impact global styles?

Source: Angular Questions

Categorized as angular, bootstrap-4 Tagged ,


When you need to import bootstrap partially (not globally) in an angular application you should import bootstrap file in a component CSS (component.css) file like this:

@import "~bootstrap/dist/css/bootstrap.css";

Dayton Hansen

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us