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.3.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="container profile-page">
<div class="row">
<div class="col-xl-6 col-lg-7 col-md-12">
<div class="card profile-header">
<div class="body">
<div class="row">
<div class="col-lg-4 col-md-4 col-12">
<div class="profile-image float-md-right"> <img src="https://bootdey.com/img/Content/avatar/avatar7.png" alt=""/> </div>
</div>
<div class="col-lg-8 col-md-8 col-12">
<h4 class="m-t-0 m-b-0"><strong>Michael</strong> Deo</h4>
<span class="job_post">Ui UX Designer</span>
<p>795 Folsom Ave, Suite 600 San Francisco, CADGE 94107</p>
<div>
<button class="btn btn-primary btn-round">Follow</button>
<button class="btn btn-primary btn-round btn-simple">Message</button>
</div>
<p class="social-icon m-t-5 m-b-0">
<a title="Twitter" href="#/"><i class="fa fa-twitter"></i></a>
<a title="Facebook" href="#/"><i class="fa fa-facebook"></i></a>
<a title="Google-plus" href="#/"><i class="fa fa-twitter"></i></a>
<a title="Behance" href="#/"><i class="fa fa-behance"></i></a>
<a title="Instagram" href="#/"><i class="fa fa-instagram "></i></a>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-6 col-lg-7 col-md-12">
<div class="card profile-header">
<div class="body">
<div class="row">
<div class="col-lg-4 col-md-4 col-12">
<div class="profile-image float-md-right"> <img src="https://bootdey.com/img/Content/avatar/avatar2.png" alt=""/> </div>
</div>
<div class="col-lg-8 col-md-8 col-12">
<h4 class="m-t-0 m-b-0"><strong>Michael</strong> Deo</h4>
<span class="job_post">Ui UX Designer</span>
<p>795 Folsom Ave, Suite 600 San Francisco, CADGE 94107</p>
<div>
<button class="btn btn-primary btn-round">Follow</button>
<button class="btn btn-primary btn-round btn-simple">Message</button>
</div>
<p class="social-icon m-t-5 m-b-0">
<a title="Twitter" href="#/"><i class="fa fa-twitter"></i></a>
<a title="Facebook" href="#/"><i class="fa fa-facebook"></i></a>
<a title="Google-plus" href="#/"><i class="fa fa-twitter"></i></a>
<a title="Behance" href="#/"><i class="fa fa-behance"></i></a>
<a title="Instagram" href="#/"><i class="fa fa-instagram "></i></a>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xl-6 col-lg-7 col-md-12">
<div class="card profile-header">
<div class="body">
<div class="row">
<div class="col-lg-4 col-md-4 col-12">
<div class="profile-image float-md-right"> <img src="https://bootdey.com/img/Content/avatar/avatar3.png" alt=""/> </div>
</div>
<div class="col-lg-8 col-md-8 col-12">
<h4 class="m-t-0 m-b-0"><strong>Michael</strong> Deo</h4>
<span class="job_post">Ui UX Designer</span>
<p>795 Folsom Ave, Suite 600 San Francisco, CADGE 94107</p>
<div>
<button class="btn btn-primary btn-round">Follow</button>
<button class="btn btn-primary btn-round btn-simple">Message</button>
</div>
<p class="social-icon m-t-5 m-b-0">
<a title="Twitter" href="#/"><i class="fa fa-twitter"></i></a>
<a title="Facebook" href="#/"><i class="fa fa-facebook"></i></a>
<a title="Google-plus" href="#/"><i class="fa fa-twitter"></i></a>
<a title="Behance" href="#/"><i class="fa fa-behance"></i></a>
<a title="Instagram" href="#/"><i class="fa fa-instagram "></i></a>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-6 col-lg-7 col-md-12">
<div class="card profile-header">
<div class="body">
<div class="row">
<div class="col-lg-4 col-md-4 col-12">
<div class="profile-image float-md-right"> <img src="https://bootdey.com/img/Content/avatar/avatar6.png" alt=""/> </div>
</div>
<div class="col-lg-8 col-md-8 col-12">
<h4 class="m-t-0 m-b-0"><strong>Michael</strong> Deo</h4>
<span class="job_post">Ui UX Designer</span>
<p>795 Folsom Ave, Suite 600 San Francisco, CADGE 94107</p>
<div>
<button class="btn btn-primary btn-round">Follow</button>
<button class="btn btn-primary btn-round btn-simple">Message</button>
</div>
<p class="social-icon m-t-5 m-b-0">
<a title="Twitter" href="#/"><i class="fa fa-twitter"></i></a>
<a title="Facebook" href="#/"><i class="fa fa-facebook"></i></a>
<a title="Google-plus" href="#/"><i class="fa fa-twitter"></i></a>
<a title="Behance" href="#/"><i class="fa fa-behance"></i></a>
<a title="Instagram" href="#/"><i class="fa fa-instagram "></i></a>
</p>
</div>
</div>
</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{
margin-top:20px;
background:#eee;
}
a {
color: #f96332;
}
.m-t-5{
margin-top: 5px;
}
.card {
background: #fff;
margin-bottom: 30px;
transition: .5s;
border: 0;
border-radius: .1875rem;
display: inline-block;
position: relative;
width: 100%;
box-shadow: none;
}
.card .body {
font-size: 14px;
color: #424242;
padding: 20px;
font-weight: 400;
}
.profile-page .profile-header {
position: relative
}
.profile-page .profile-header .profile-image img {
border-radius: 50%;
width: 140px;
border: 3px solid #fff;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23)
}
.profile-page .profile-header .social-icon a {
margin: 0 5px
}
.profile-page .profile-sub-header {
min-height: 60px;
width: 100%
}
.profile-page .profile-sub-header ul.box-list {
display: inline-table;
table-layout: fixed;
width: 100%;
background: #eee
}
.profile-page .profile-sub-header ul.box-list li {
border-right: 1px solid #e0e0e0;
display: table-cell;
list-style: none
}
.profile-page .profile-sub-header ul.box-list li:last-child {
border-right: none
}
.profile-page .profile-sub-header ul.box-list li a {
display: block;
padding: 15px 0;
color: #424242
}