1. First, we need fresh reactjs setup, and for that, we need to run below commands into out terminal, and also we should have latest node version installed on our system:
npx create-react-app my-awesome-project
cd my-awesome-project
npm start
2. Now we need to run below commands into our project terminal to get bootstrap and related modules into our reactjs application:
npm install [email protected] --save
npm start //For start project again
3. Finally for the main output, we need to add below code into our my-awesome-project/src/App.js file or if you have fresh setup then you can replace my-awesome-project/src/App.js file code with below code:
import React from 'react';
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
function App() {
return (
<div>
<div class="container">
<div class="row principal-content">
<div class="col-sm-4 col-xs-6">
<div class="panel panel-default">
<div class="panel-thumbnail"><img class="img-responsive" src="https://www.bootdey.com/image/500x200/FF7F50/000000"/></div>
<div class="panel-body content-information">
<p class="lead">Bootdey Bootstrap</p>
<p>120k Followers, 900 Posts</p>
<p>
<img width="28px" height="28px" src="https://lh3.googleusercontent.com/uFp_tsTJboUY7kue5XAsGA=s28"/>
<img width="28px" height="28px" src="https://lh3.googleusercontent.com/uFp_tsTJboUY7kue5XAsGA=s28"/>
</p>
</div>
</div>
</div>
<div class="col-sm-4 col-xs-6">
<div class="panel panel-default">
<div class="panel-thumbnail"><img class="img-responsive" src="https://www.bootdey.com/image/500x200/4169E1/000000"/></div>
<div class="panel-body content-information">
<p class="lead">Bootstrap Templates</p>
<p>902 Followers, 88 Posts</p>
<p>
<img width="28px" height="28px" src="https://lh3.googleusercontent.com/uFp_tsTJboUY7kue5XAsGA=s28"/>
<img width="28px" height="28px" src="https://lh3.googleusercontent.com/uFp_tsTJboUY7kue5XAsGA=s28"/>
</p>
</div>
</div>
</div>
<div class="col-sm-4 col-xs-6">
<div class="panel panel-default">
<div class="panel-thumbnail"><img class="img-responsive" src="https://www.bootdey.com/image/500x200/228B22/000000"/></div>
<div class="panel-body content-information">
<p class="lead">Social Media</p>
<p>19k Followers, 789 Posts</p>
<p>
<img width="28px" height="28px" src="https://lh3.googleusercontent.com/uFp_tsTJboUY7kue5XAsGA=s28"/>
<img width="28px" height="28px" src="https://lh3.googleusercontent.com/uFp_tsTJboUY7kue5XAsGA=s28"/>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
);
}
export default App;
4. Now we need to add below code into our my-awesome-project/src/App.css file :
.principal-content, .content-information{
background:#FFFFFF;
}