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>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<div class="container">
<div class="row">
<div class="col-md-12 col-lg-5">
<div class="card">
<div class="p-4">
<div class="d-flex flex-row">
<div class=""><img src="https://bootdey.com/img/Content/avatar/avatar1.png" alt="user" class="rounded-circle" width="100" /></div>
<div class="pl-4">
<h3>Daniel Kristeen</h3>
<h4>UIUX Designer</h4>
<button class="btn btn-success btn-rounded text-white text-uppercase font-14"><i class="fa fa-plus mr-2"></i> Follow</button>
</div>
</div>
<div class="row mt-5">
<div class="col border-right text-center">
<h2 class="font-light">14</h2>
<h4 class="text-uppercase">Photos</h4>
</div>
<div class="col border-right text-center">
<h2 class="font-light">54</h2>
<h4 class="text-uppercase">Videos</h4>
</div>
<div class="col text-center">
<h2 class="font-light">145</h2>
<h4 class="text-uppercase">Tasks</h4>
</div>
</div>
</div>
<div class="card-body border-top">
<p class="text-center aboutscroll">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore
</p>
<hr />
<h4 class="font-medium text-center mt-4">Followers</h4>
<ul class="list-style-none list-icons d-flex flex-item text-center pt-2">
<li class="col px-2">
<a href="javascript:void(0)" data-toggle="tooltip" title="" data-original-title="Shaina Chhatraliya">
<img src="https://bootdey.com/img/Content/avatar/avatar1.png" alt="user" class="rounded-circle" width="50" />
</a>
</li>
<li class="col px-2">
<a href="javascript:void(0)" data-toggle="tooltip" title="" data-original-title="Nirav Joshi">
<img src="https://bootdey.com/img/Content/avatar/avatar2.png" alt="user" class="rounded-circle" width="50" />
</a>
</li>
<li class="col px-2">
<a href="javascript:void(0)" data-toggle="tooltip" title="" data-original-title="Vishal Bhatt">
<img src="https://bootdey.com/img/Content/avatar/avatar3.png" alt="user" class="rounded-circle" width="50" />
</a>
</li>
<li class="col px-2">
<a href="javascript:void(0)" data-toggle="tooltip" title="" data-original-title="More">
<button class="btn btn-circle btn-info text-white btn-lg" href="javascript:void(0)">
5+
</button>
</a>
</li>
</ul>
</div>
<div class="card-body border-top">
<ul class="list-style-none list-icons d-flex flex-item text-center">
<li class="col">
<a href="javascript:void(0)" class="text-muted" data-toggle="tooltip" title="" data-original-title="Website"><i class="fa fa-globe font-20"></i></a>
</li>
<li class="col">
<a href="javascript:void(0)" class="text-muted" data-toggle="tooltip" title="" data-original-title="twitter"><i class="fa fa-twitter font-20"></i></a>
</li>
<li class="col">
<a href="javascript:void(0)" class="text-muted" data-toggle="tooltip" title="" data-original-title="Facebook"><i class="fa fa-facebook-square font-20"></i></a>
</li>
<li class="col">
<a href="javascript:void(0)" class="text-muted" data-toggle="tooltip" title="" data-original-title="Youtube"><i class="fa fa-youtube font-20"></i></a>
</li>
<li class="col">
<a href="javascript:void(0)" class="text-muted" data-toggle="tooltip" title="" data-original-title="Linkdin"><i class="fa fa-linkedin font-20"></i></a>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-12 col-lg-5">
<div class="card">
<div class="p-4">
<div class="d-flex flex-row">
<div class=""><img src="https://bootdey.com/img/Content/avatar/avatar6.png" alt="user" class="rounded-circle" width="100" /></div>
<div class="pl-4">
<h3>Daniel Kristeen</h3>
<h4>UIUX Designer</h4>
<button class="btn btn-success btn-rounded text-white text-uppercase font-14"><i class="fa fa-plus mr-2"></i> Follow</button>
</div>
</div>
<div class="row mt-5">
<div class="col border-right text-center">
<h2 class="font-light">14</h2>
<h4 class="text-uppercase">Photos</h4>
</div>
<div class="col border-right text-center">
<h2 class="font-light">54</h2>
<h4 class="text-uppercase">Videos</h4>
</div>
<div class="col text-center">
<h2 class="font-light">145</h2>
<h4 class="text-uppercase">Tasks</h4>
</div>
</div>
</div>
<div class="card-body border-top">
<p class="text-center aboutscroll">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore
</p>
<hr />
<h4 class="font-medium text-center mt-4">Followers</h4>
<ul class="list-style-none list-icons d-flex flex-item text-center pt-2">
<li class="col px-2">
<a href="javascript:void(0)" data-toggle="tooltip" title="" data-original-title="Shaina Chhatraliya">
<img src="https://bootdey.com/img/Content/avatar/avatar7.png" alt="user" class="rounded-circle" width="50" />
</a>
</li>
<li class="col px-2">
<a href="javascript:void(0)" data-toggle="tooltip" title="" data-original-title="Nirav Joshi">
<img src="https://bootdey.com/img/Content/avatar/avatar4.png" alt="user" class="rounded-circle" width="50" />
</a>
</li>
<li class="col px-2">
<a href="javascript:void(0)" data-toggle="tooltip" title="" data-original-title="Vishal Bhatt">
<img src="https://bootdey.com/img/Content/avatar/avatar5.png" alt="user" class="rounded-circle" width="50" />
</a>
</li>
<li class="col px-2">
<a href="javascript:void(0)" data-toggle="tooltip" title="" data-original-title="More">
<button class="btn btn-circle btn-info text-white btn-lg" href="javascript:void(0)">
5+
</button>
</a>
</li>
</ul>
</div>
<div class="card-body border-top">
<ul class="list-style-none list-icons d-flex flex-item text-center">
<li class="col">
<a href="javascript:void(0)" class="text-muted" data-toggle="tooltip" title="" data-original-title="Website"><i class="fa fa-globe font-20"></i></a>
</li>
<li class="col">
<a href="javascript:void(0)" class="text-muted" data-toggle="tooltip" title="" data-original-title="twitter"><i class="fa fa-twitter font-20"></i></a>
</li>
<li class="col">
<a href="javascript:void(0)" class="text-muted" data-toggle="tooltip" title="" data-original-title="Facebook"><i class="fa fa-facebook-square font-20"></i></a>
</li>
<li class="col">
<a href="javascript:void(0)" class="text-muted" data-toggle="tooltip" title="" data-original-title="Youtube"><i class="fa fa-youtube font-20"></i></a>
</li>
<li class="col">
<a href="javascript:void(0)" class="text-muted" data-toggle="tooltip" title="" data-original-title="Linkdin"><i class="fa fa-linkedin font-20"></i></a>
</li>
</ul>
</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 :
body{
background: #edf1f5;
margin-top:20px;
}
.card {
position: relative;
display: flex;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
background-color: #fff;
background-clip: border-box;
border: 0 solid transparent;
border-radius: 0;
}
ul.list-style-none {
margin: 0;
padding: 0;
}
ul.list-style-none li {
list-style: none;
}
.font-light {
font-weight: 300;
}
.font-20 {
font-size: 25px !important;
}
ul.list-style-none li a {
color: #313131;
padding: 8px 0;
display: block;
text-decoration: none;
}
.text-muted {
color: #8898aa!important;
}