What is the best way to override css classes/customise react-bootstrap components? - (I have read the docs, and unless I am missing something, this isn't covered).
From what I have read, it seems like it's a choice between inline styles (radium) and css modules but which is better and why?
I think the answer to this for most people (like me) is that one can add custom styles to react-bootstrap components using the
style
prop. E.g. for a default Button with blue text:or
I am not sure if this answers your question but Documentation clearly provide examples. For instance Button
Props
This one could be modified to add custom CSS class to your Button component. Also component could be changed with setting componentClass.
Where
custom-class
is CSS class that couldFiddle with example of how to use
bsClass
.Inline styles:
According to bug filled, inline styles will not be supported officially.
But issue states that:
NOTE Not all components provided by react-bootstrap allow class customization through
bsClass
, for example Breadcrumb