The creators of React moved Bootstrap under his comb. When working with this library React-Bootstrap , the question arose how to customize the styles of components? How to add your classes to the complex components? It turns out that the bootstrap classes are encapsulated into the components of the reactor. The documentation suggests using bsStyle and defining inline styles, but what if I, for example, want to add my class to a component? Or do I not want to use inline styles?

  • one
  • thanks for the answer. Could you postpone this case in reply, so that I could choose it and close the question? - Iga

1 answer 1

The React-Bootstrap components have props with the name bsClass - by default there stands the Bootstrap class. When setting bsClass="qwerty" , this component will have class="qwerty"

jsfiddle.net/m3hg89yt/2

  • 2
    Add the code to the answer, and then the external resource may be spilled out and the code will be lost. - br3t