Reputation: 4537
Are Cards added to React-Bootstrap yet?
Or is there any other undocumented way of adding it?
What I am thinking of right now is -> className = 'bootstrap card class syntax'
, but I guess, it won't work because it won't recognise it.
Upvotes: 1
Views: 6950
Reputation: 744
Bootstrap classes can be used the same way in react like in any non-react project, even without the use of react-bootstrap
. It can be imported as a CDN in your index.html file...
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
... or it can also be saved locally and imported that way. Or you can configure webpack to import css files directly into your project.
You'd just have to make sure to use className=
instead of class=
, but otherwise, it works exactly the same way.
<div className="col-xs-12 well"></div>
react-bootstrap
is an add-on that provides components that do the same thing. So, even if it's not in react-bootstrap yet, you can still use the functionality, but just as a straight css class.
Upvotes: 1
Reputation: 4537
Sort of found the answer, but it doesn't go by the name of card
You can use <Thumbnail>
, it gives the same feel as that of a card.
Upvotes: 3